Skip to content

Commit 4268683

Browse files
committed
cleaning entities
1 parent 6a753ca commit 4268683

File tree

5 files changed

+6
-16
lines changed

5 files changed

+6
-16
lines changed

DevRookies/DevRookies/Enemy.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ bool Enemy::CleanUp()
3838
return false;
3939
}
4040

41-
void Enemy::Die()
42-
{
43-
44-
}
45-
4641
const Collider* Enemy::GetCollider() const
4742
{
4843
return collider;

DevRookies/DevRookies/Enemy.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
class Enemy: public Entity
1212
{
1313
protected:
14-
/*Animation * animation = nullptr;
15-
Collider* collider = nullptr;*/
1614

1715
float distance = 400.0F;
1816

@@ -44,7 +42,6 @@ class Enemy: public Entity
4442

4543
//virtual void Draw(SDL_Texture* sprites);
4644
virtual void OnCollision(Collider*, Collider*) {};
47-
void Die();
4845

4946
bool Save(pugi::xml_node&) const;
5047
bool Load(pugi::xml_node&);

DevRookies/DevRookies/Entity.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ class Entity
3636
virtual bool PreUpdate() { return true; };
3737
virtual bool Update(float dt) { return true; };
3838
virtual bool PostUpdate() { return true; };
39-
4039
virtual bool CleanUp() { return true; };
4140
virtual bool Save(pugi::xml_node& file) const;
4241
virtual bool Load(pugi::xml_node& file);
@@ -46,7 +45,7 @@ class Entity
4645
virtual void OnCollision(Collider*) {};
4746
void AddCollider();
4847

49-
bool flipX = false;
48+
5049

5150
virtual fPoint GetPosition();
5251
virtual void SetPosition(const float &x, const float &y);
@@ -58,6 +57,7 @@ class Entity
5857
Collider* collider = nullptr;
5958
Animation* current_animation = nullptr;
6059
SDL_Texture* texture = nullptr;
60+
bool flipX = false;
6161

6262
};
6363

DevRookies/DevRookies/Player.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ void Player::PreMove() {
266266
current_movement = IDLE;
267267

268268
if (godmode) {
269-
if (App->input->GetKey(SDL_SCANCODE_W) == KEY_REPEAT)
269+
if (App->input->GetKey(SDL_SCANCODE_S) == KEY_REPEAT)
270270
if (current_godmove != UPGOD)
271271
current_godmove = DOWNGOD;
272272
else
@@ -279,7 +279,7 @@ void Player::PreMove() {
279279
current_godmove = IDLEGOD;
280280
}
281281
else{
282-
if (App->input->GetKey(SDL_SCANCODE_W) == KEY_DOWN)
282+
if (App->input->GetKey(SDL_SCANCODE_S) == KEY_DOWN)
283283
if (current_element == FIRE)
284284
current_element = ICE;
285285
else
@@ -289,12 +289,12 @@ void Player::PreMove() {
289289
if (App->input->GetKey(SDL_SCANCODE_SPACE) == KEY_DOWN)
290290
current_movement = UP;
291291

292-
if (App->input->GetKey(SDL_SCANCODE_S) == KEY_DOWN && App->input->GetKey(SDL_SCANCODE_A) == KEY_REPEAT) {
292+
if (App->input->GetKey(SDL_SCANCODE_B) == KEY_DOWN && App->input->GetKey(SDL_SCANCODE_A) == KEY_REPEAT) {
293293
current_movement = LEFT_HIT;
294294
AddFX(2, 0);
295295
}
296296

297-
if (App->input->GetKey(SDL_SCANCODE_S) == KEY_DOWN && App->input->GetKey(SDL_SCANCODE_D) == KEY_REPEAT) {
297+
if (App->input->GetKey(SDL_SCANCODE_B) == KEY_DOWN && App->input->GetKey(SDL_SCANCODE_D) == KEY_REPEAT) {
298298
current_movement = RIGHT_HIT;
299299
AddFX(2, 0);
300300
}

DevRookies/DevRookies/Player.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ class Player : public Entity
2323
fPoint lastPosition;
2424
p2SString player_texture, jump_fx_name, dash_fx_name, dead_fx_name, victory_fx_name;
2525

26-
2726
uint heigth_animation = 53;
28-
uint scene = 1;
2927

3028
void PreMove();
3129
void Move();

0 commit comments

Comments
 (0)