mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-24 13:26:17 +01:00
fixme: adding public SceneNode to the entity class makes compilation impossible
This commit is contained in:
parent
fd449af98e
commit
00fa8b926f
@ -1,7 +1,6 @@
|
|||||||
#ifndef SCENE_NODE_CPP
|
#ifndef SCENE_NODE_CPP
|
||||||
#define SCENE_NODE_CPP
|
#define SCENE_NODE_CPP
|
||||||
|
|
||||||
#include "scenenode.hpp"
|
|
||||||
|
|
||||||
void SceneNode::attachChild(ScenePointer child) // takes ownership of the scene node
|
void SceneNode::attachChild(ScenePointer child) // takes ownership of the scene node
|
||||||
{
|
{
|
||||||
@ -32,7 +31,7 @@ SceneNode::ScenePointer SceneNode::detachChild(const SceneNode& node) // finds n
|
|||||||
|
|
||||||
void SceneNode::drawCurrent(sf::RenderTarget& target, sf::RenderStates states) const
|
void SceneNode::drawCurrent(sf::RenderTarget& target, sf::RenderStates states) const
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SceneNode::draw(sf::RenderTarget& target, sf::RenderStates states) const
|
void SceneNode::draw(sf::RenderTarget& target, sf::RenderStates states) const
|
||||||
@ -29,6 +29,6 @@ class SceneNode : public sf::Transformable, public sf::Drawable, private sf::Non
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "scenenode.cpp"
|
#include "SceneNode.cpp"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
Binary file not shown.
@ -1,15 +1,17 @@
|
|||||||
#ifndef ENTITY_HPP
|
#ifndef ENTITY_HPP
|
||||||
#define ENTITY_HPP
|
#define ENTITY_HPP
|
||||||
|
#include "SceneNode.hpp"
|
||||||
|
#include "SceneNode.cpp"
|
||||||
|
|
||||||
class Entity
|
class Entity : public SceneNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void SetVelocity(sf::Vector2f velocity);
|
void SetVelocity(sf::Vector2f velocity);
|
||||||
void setVelocity(float velocityX, float velocityY);
|
void setVelocity(float velocityX, float velocityY);
|
||||||
sf::Vector2f getVelocity() const;
|
sf::Vector2f getVelocity() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
sf::Vector2f mVelocity; // default ocnstructor initializes this vector to a zero vector
|
sf::Vector2f mVelocity; // default ocnstructor initializes this vector to a zero vector
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -5,9 +5,9 @@
|
|||||||
#include <SFML/Graphics.hpp>
|
#include <SFML/Graphics.hpp>
|
||||||
#include "constants.hpp"
|
#include "constants.hpp"
|
||||||
#include "resources.hpp"
|
#include "resources.hpp"
|
||||||
|
#include "SceneNode.hpp"
|
||||||
#include "entity.hpp"
|
#include "entity.hpp"
|
||||||
#include "aircraft.hpp"
|
#include "aircraft.hpp"
|
||||||
#include "scenenode.hpp"
|
|
||||||
#include "basic.cpp"
|
#include "basic.cpp"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user