-
Notifications
You must be signed in to change notification settings - Fork 0
/
particle.h
43 lines (34 loc) · 842 Bytes
/
particle.h
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
/*
Copyright (C) 2016 Meritxell Jordana
Copyright (C) 2016 Marc Sanchez
*/
#ifndef __PARTICLE_H
#define __PARTICLE_H
#include "map.h"
using namespace std;
enum State {
Moving,
Quiet
};
class Particle {
float widthTranslation;
float heightTranslation;
float widthTranslationVector;
float heightTranslationVector;
float widthCurrentTranslation;
float heightCurrentTranslation;
long timeRemaining;
State state;
Direction direction;
public:
Particle();
void initMovement(float widthTranslation, float heightTranslation,
long duration, Direction direction);
bool integrate(long elapsedTime);
float getCurrentWidthTranslation();
float getCurrentHeightTranslation();
State getState();
void setState(State state);
Direction getDirection();
};
#endif