-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEnemigoRojo.cpp
37 lines (28 loc) · 1.17 KB
/
EnemigoRojo.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
#include "EnemigoRojo.h"
EnemigoRojo::EnemigoRojo(SDL_Renderer* renderer, list<Personaje*> *personajes)
{
vector<SDL_Texture*>*texturas = new vector<SDL_Texture*>();
vector<SDL_Texture*>*texturas_left = new vector<SDL_Texture*>();
texturas->push_back(IMG_LoadTexture(renderer,"EnemigoRojo/standing/1.png"));
texturas->push_back(IMG_LoadTexture(renderer,"EnemigoRojo/standing/2.png"));
texturas->push_back(IMG_LoadTexture(renderer,"EnemigoRojo/standing/3.png"));
texturas->push_back(IMG_LoadTexture(renderer,"EnemigoRojo/standing/4.png"));
texturas_left->push_back(IMG_LoadTexture(renderer,"EnemigoRojo/standing_left/1.png"));
texturas_left->push_back(IMG_LoadTexture(renderer,"EnemigoRojo/standing_left/2.png"));
texturas_left->push_back(IMG_LoadTexture(renderer,"EnemigoRojo/standing_left/3.png"));
texturas_left->push_back(IMG_LoadTexture(renderer,"EnemigoRojo/standing_left/4.png"));
mapa_texturas["left"]=texturas_left;
mapa_texturas["right"]=texturas;
vector_actual_str = "right";
rect.x = 750;
rect.y = 250;
init(renderer, personajes);
}
EnemigoRojo::~EnemigoRojo()
{
//dtor
}
void EnemigoRojo::act()
{
rect.x--;
}