-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBomberman.cpp
110 lines (89 loc) · 1.89 KB
/
Bomberman.cpp
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
//
// Bomberman.cpp for in /home/barnet_m//Tek2/bomberman/bomberman-2015-tolsa_c
//
// Made by mathieu barnetche
// Login <barnet_m@epitech.net>
//
// Started on Tue May 29 11:17:00 2012 mathieu barnetche
// Last update Sun Jun 3 02:44:26 2012 mathieu barnetche
//
#include "Bomberman.hh"
Bomberman::Bomberman()
{
}
Bomberman::Bomberman(int x, int y, int R, int G, int B, int s)
{
gdl::Color color(R, G, B, 255);
this->position.x = x * BLOCKSIZE;
this->position.y = y * BLOCKSIZE;
this->position.z = 0;
this->color_ = color;
this->speed = 1.0f + s;
this->portee = PORTEE_BOMB;
this->timer_.play();
}
Bomberman::~Bomberman()
{
}
Vector3f Bomberman::getPos() const
{
return (this->position);
}
float Bomberman::getXf() const
{
return (this->position.x + (BLOCKSIZE / 2));
}
float Bomberman::getYf() const
{
return (this->position.y + (BLOCKSIZE / 2));
}
int Bomberman::getAngle() const
{
return (this->angle);
}
float Bomberman::getSpeed() const
{
return (this->speed);
}
int Bomberman::getPortee() const
{
return this->portee;
}
void Bomberman::setPortee(const int& portee_)
{
this->portee = portee_;
}
int Bomberman::getId() const
{
return (this->id);
}
void Bomberman::setId(int i)
{
this->id = i;
}
void Bomberman::setPos(Vector3f const&p)
{
this->position = p;
}
void Bomberman::setPos(float const& x, float const& y, float const& z)
{
this->position.y = y;
this->position.x = x;
this->position.z = z;
}
void Bomberman::setAngle(int const &a)
{
this->angle = a;
}
void Bomberman::setSpeed(float const&s)
{
this->speed = s;
}
int Bomberman::getStockBomb() const
{
return (this->stockbomb);
}
void Bomberman::setStockBomb(int s)
{
this->stockbomb = s;
}