Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include "Animation.h"
- #include "SDLib.h"
- const int VIRUS = 1;
- const int SMALL_WORM = 2;
- const int LARGE_WORM = 3;
- const int TANK = 4;
- const int RED_CELL = 5;
- const int BLUE_CELL = 6;
- const int CRAWLER = 7;
- const int SQUID = 8;
- const int BOMB = 9;
- const int BLASTER = 10;
- const int FLY = 11;
- class Enemies
- {
- public:
- struct Vector2
- {
- float x;
- float y;
- };
- float speed, previousSpeed, initialHealth, currentHealth, damage, resistance, angle;
- int burntAlpha;
- Animation deathAnim;
- Animation processorReachedAnim;
- Animation walkingAnim, poisonAnim;
- Vector2 position;
- bool alive, freeze, flying, poisoned, lightningTarget, killedByLightning, playDeathAnim, reachedProcessor, decrementEnemy;
- int width, height, sourceX, sourceY, waveToAppear;
- int maxFreezeTime;
- timer freezeTimer;
- float freezeStrength, currentFreezeTime;
- int poisonDmgInterval, pDmgCounter, numberOfPoisonAttacks;
- timer pIntervalTimer;
- float poisonStrength, currentPoisonTime;
- Enemies();
- Enemies(SDLib& sdlLib, int dir, int posX, int posY, int prefDirection, int EnemyType, int assignedWave);
- void Update(Map& cMap, SDLib& sdlLib);
- void DrawGreenHealthBar(SDLib& sdlLib);
- void DrawRedHealthBar(SDLib& sdlLib);
- void Draw(SDLib& sdlLib);
- void UpdateCards(SDLib& sdlLib);
- static const int LEFT = 0;
- static const int RIGHT = 1;
- static const int UP = 2;
- static const int DOWN = 3;
- int type, direction, preferredDirection, oldPreferredDirection;
- private:
- float hasGoneUp32;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement