Created
April 7, 2017 19:56
-
-
Save PoetaKodu/9990d4889c960128c3d65332784a2cde to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Pawn.hpp" // Klasa przeciwnika dziedziczy po pionku. Dodajemy go. | |
/* Tworzymy klase pionka podobnie jak klase gracza | |
z ta roznica, ze jej kontroler poki co nic nie bedzie robil. | |
Zachowaniem wroga zajmiemy sie pozniej. | |
*/ | |
class CEnemy | |
: public IPawn | |
{ | |
sf::Sprite m_sprite; // Tworzymy sprajta do wyswietlania wroga | |
public: | |
CEnemy(); // Konstruktor, w ktorym stworzymy wstepne ustawienie wroga | |
// Metoda do ustawiania pozycji. | |
virtual void SetLocation(const grim::Vector2 &location) override; | |
// Metoda do wyswietlania wroga. | |
virtual void Draw() override; | |
}; | |
/* Kontroler sztucznej inteligencji dla wroga. | |
Poki co zostawimy go pustego. | |
*/ | |
class CEnemyAIController | |
: public IPawnController | |
{ | |
public: | |
CEnemyAIController(); // Konstruktor | |
// Metoda ciagle aktualizujaca AI wroga. | |
virtual void Update(const float &deltaTime) override; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment