Hello SFML-dev community,
I'm currently programming the project from the SFML Game Developüment book.
Due to the fact that the shown code and their explanation don't match, i sometimes got errors, which i can normally fix without much effort. But this time i just can't fix it...
I finished the SceneNode tutorial and my Entity Class should be able to inherit SceneNode, but there are link-errors. If i delet the inheritation from the Entity Class there is no error...
Here's a link to the download of my project
http://www.file-upload.net/download-9677731/SFML-Book.7z.htmlAnd Antivirus-Scan if you don't trust me^^
https://www.virustotal.com/de/file/42d757e041a40521a9a2f061aacad1c07ffba5d8e47f069adaf9ac0e117d8e18/analysis/1413200850/Or if the Code of Entity and SceneNode is enaugh..
SceneNode.h
#ifndef SCENENODE_H
#define SCENENODE_H
#include <memory>
#include <vector>
#include <algorithm>
#include <cassert>
#include <SFML\Graphics.hpp>
class SceneNode : public sf::Transformable, public sf::Drawable, private sf::NonCopyable
{
public:
typedef std::unique_ptr<SceneNode> Ptr;
public:
SceneNode();
void attachChild(Ptr child);
Ptr detachChild(const SceneNode& node);
private:
virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const;
virtual void drawCurrent(sf::RenderTarget& target, sf::RenderStates states) const;
private:
std::vector<Ptr> mChildren;
SceneNode* mParent;
};
#endif
Entity.h
#ifndef ENTITY_H
#define ENTITY_H
#include <iostream>
#include <cassert>
#include "SFML\Graphics.hpp"
#include "SceneNode.h"
class Entity : SceneNode
{
public:
void setVelocity(sf::Vector2f);
void setVelocity(float, float);
sf::Vector2f getVelocity() const;
private:
private:
sf::Vector2f mVelocity;
};
#endif
if you use the Project, my sfml-files are in D:\SFML-2.1x86
Hope you can help me...
Soziapath