-
Notifications
You must be signed in to change notification settings - Fork 0
/
Enemy.h
36 lines (36 loc) · 900 Bytes
/
Enemy.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
#ifndef ENEMY_H
#define ENEMY_H
#include <iostream>
#include "Global.h"
#include "GameObj.h"
#include "Player.h"
class Enemy : public GameObj{
public:
Enemy();
Enemy(float x, float y, int obj_code, std::string enemyname);
void render(float x, float y, SDL_Rect* clip = NULL, SDL_RendererFlip flipType=SDL_FLIP_NONE);
void updatePos(SDL_Rect playerCollisionBox);
void enemyHitStatic(GameObj object);
void renderHealthBar(SDL_Rect fillHealth);
// void free();
bool isCollidingBelow;
// int code;
int health;
float xPrevPos;
float yPrevPos;
float maxVel;
float jumpVel;
float tempJvel;
int jumpCount;
float xDelPos;
float yDelPos;
// SDL_RendererFlip flipType;
vector<SDL_Rect> run;
vector<SDL_Rect> jump;
// SDL_Rect renderingClip;
//SDL_Rect camera;
void initializeClips();
void bulletHitEnemy(GameObj object);
void animateRun(bool anim);
};
#endif