hydrangea/include/node.h

36 lines
579 B
C++

#include <iostream>
#include <strings.h>
#include <vector>
#include "math/vec2.h"
#include "scene.h"
#include "util.h"
#ifndef NODE_H
#define NODE_H
class Node
{
private:
// Methods
void UpdateChildren();
public:
// Constructor and Destructor
Node();
~Node();
// Methods
virtual void Update();
void AddChild(Node* child);
// Member Variables
std::string name;
Vec2 world_position = Vec2(0, 0);
Vec2 local_position = Vec2(0, 0);
Scene* scene = NULL;
Node* parent = NULL;
std::vector<Node*> children;
};
#endif