mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-07-04 16:43:05 +02: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
|
||||
#define SCENE_NODE_CPP
|
||||
|
||||
#include "scenenode.hpp"
|
||||
|
||||
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::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
|
||||
Binary file not shown.
@ -1,15 +1,17 @@
|
||||
#ifndef ENTITY_HPP
|
||||
#define ENTITY_HPP
|
||||
#include "SceneNode.hpp"
|
||||
#include "SceneNode.cpp"
|
||||
|
||||
class Entity
|
||||
class Entity : public SceneNode
|
||||
{
|
||||
public:
|
||||
void SetVelocity(sf::Vector2f velocity);
|
||||
void setVelocity(float velocityX, float velocityY);
|
||||
sf::Vector2f getVelocity() const;
|
||||
public:
|
||||
void SetVelocity(sf::Vector2f velocity);
|
||||
void setVelocity(float velocityX, float velocityY);
|
||||
sf::Vector2f getVelocity() const;
|
||||
|
||||
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 "constants.hpp"
|
||||
#include "resources.hpp"
|
||||
#include "SceneNode.hpp"
|
||||
#include "entity.hpp"
|
||||
#include "aircraft.hpp"
|
||||
#include "scenenode.hpp"
|
||||
#include "basic.cpp"
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user