-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathActor.h
More file actions
46 lines (34 loc) · 765 Bytes
/
Copy pathActor.h
File metadata and controls
46 lines (34 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//
// Created by ryousuke kaga on 2023/11/18.
//
#ifndef GAME_IN_CPP_ACTOR_H
#define GAME_IN_CPP_ACTOR_H
#include "Vector2.h"
#include "Math.h"
#include "Game.h"
#include "Component.h"
class Game;
class Actor {
public:;
enum State {
EActive,
EPaused,
EDead
};
Actor(Game* game);
virtual ~Actor();
void Update(float deltaTime);
void UpdateComponents(float deltaTime);
virtual void UpdateActor(float deltaTime);
void AddComponent(Component* component);
void RemoveComponent(Component* component);
Game* GetGame();
State state;
Vector2 position;
float scale;
float rotation;
protected:
std::vector<Component*> mComponents;
Game* mGame;
};
#endif //GAME_IN_CPP_ACTOR_H