SUPER Space invader : Turbo edition DX - VS GOD 1.0.0
A simple space invader ripoff
god.h
Go to the documentation of this file.
1
14#ifndef GUARD_GOD_H
15#define GUARD_GOD_H
16
17#include "utils.h"
18#include "invadersGrid.h"
19
23enum class GodState{
24 NONE,
25 AWAKE,
26 WAIT,
29 THROW,
30};
31
32
33// I don't want to put that in config, I feel like it would be useless and overkill at this point
34#define GOD_BENCH_SIZE 64
35#define GOD_HAND_SIZE 64
36#define GOD_HAND_DISTANCE 100
37
38
47class God{
48public:
49
54
58 unsigned counter;
59
60
61 // we do not use a Position because it is not used for pixel coordinate, but vector indexes
65 unsigned thrownInvPosX;
66
70 unsigned thrownInvPosY;
71
76
81
86
93 Position getRightHandPos(unsigned screenWidth) const;
94
95};
96
97#endif
stores all God's data
Definition: god.h:47
unsigned counter
timer used differently in all states
Definition: god.h:58
unsigned thrownInvPosY
y index (invader in the column) of the invader thrown by the hand of god
Definition: god.h:70
Position thrownTransition
position of a point for bezier's curve (used in RETRIEVE1 and RETRIEVE2 states, for the hand animatio...
Definition: god.h:85
Position getRightHandPos(unsigned screenWidth) const
give initial the pixel coordinates of god's right hand
Definition: godManager.cpp:151
Position thrownVector
direction of the thrown invader movement
Definition: god.h:80
GodState state
god's current state
Definition: god.h:53
InvaderType thrownInvType
type of the invader thrown by the hand of god
Definition: god.h:75
unsigned thrownInvPosX
x index (column in the grid) of the invader thrown by the hand of god
Definition: god.h:65
GodState
list of all known god states
Definition: god.h:23
InvaderType
List of all invader type.
Definition: invadersGrid.h:22
utilies for the game
nsGraphics::Vec2D Position
Definition: utils.h:51