-
Notifications
You must be signed in to change notification settings - Fork 1
/
Circle.h
47 lines (37 loc) · 1003 Bytes
/
Circle.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
44
45
46
47
// Module: Gameplay Programming
// Assignment 1: Pixl
#ifndef _CIRCLE_H_
#define _CIRCLE_H_
#include "entity.h"
#include "constants.h"
// declare circle namespace
namespace CircleNS {
const float MASS = 300.0f;
const float SCALING = 0.2f;
const float SPEED = 100;
const float ROTATION_RATE = (float)PI / 4;
const int WIDTH = 128;
const int HEIGHT = 128;
const int TEXTURE_COLS = 1;
const int CIRCLE_END_FRAME = 0;
const int CIRCLE_START_FRAME = 0;
const int X = GAME_WIDTH / 2 - WIDTH / 2;
const int Y = GAME_HEIGHT / 2 - HEIGHT / 2;
}
class Circle : public Entity {
public:
Circle();
virtual void draw();
virtual bool initialize(Game *gamePtr, int width, int height, int ncols, TextureManager *textureM);
void update(float deltaTime);
void spawn();
void damage(WEAPON);
// Freeze Circle
void freeze();
void unfreeze();
private:
float velocity_x = 0.0f;
float velocity_y = 0.0f;
bool isFrozen = false;
};
#endif