forked from jaildesigner-jailgames/jaildoctors_dilemma
Inicio de la clase enemy
This commit is contained in:
BIN
media/enemies/enemy01.png
Normal file
BIN
media/enemies/enemy01.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 239 B |
11
source/enemy.cpp
Normal file
11
source/enemy.cpp
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#include "enemy.h"
|
||||||
|
|
||||||
|
// Constructor
|
||||||
|
Enemy::Enemy()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// Destructor
|
||||||
|
Enemy::~Enemy()
|
||||||
|
{
|
||||||
|
}
|
||||||
21
source/enemy.h
Normal file
21
source/enemy.h
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "ifdefs.h"
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#ifndef ENEMY_H
|
||||||
|
#define ENEMY_H
|
||||||
|
|
||||||
|
// Clase Enemy
|
||||||
|
class Enemy
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
public:
|
||||||
|
// Constructor
|
||||||
|
Enemy();
|
||||||
|
|
||||||
|
// Destructor
|
||||||
|
~Enemy();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -13,7 +13,7 @@ Game::Game(SDL_Window *window, SDL_Renderer *renderer, Asset *asset, Lang *lang,
|
|||||||
mRoom = new Room(mAsset->get("01.room"), mRenderer, mAsset);
|
mRoom = new Room(mAsset->get("01.room"), mRenderer, mAsset);
|
||||||
mEventHandler = new SDL_Event();
|
mEventHandler = new SDL_Event();
|
||||||
mTextureText = new LTexture();
|
mTextureText = new LTexture();
|
||||||
mText = new Text(mAsset->get("nokia2.txt"), mTextureText, renderer);
|
mText = new Text(mAsset->get("smb2.txt"), mTextureText, renderer);
|
||||||
mFade = new Fade(renderer);
|
mFade = new Fade(renderer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ bool Game::loadMedia()
|
|||||||
bool success = true;
|
bool success = true;
|
||||||
|
|
||||||
// Texturas
|
// Texturas
|
||||||
success &= loadTextureFromFile(mTextureText, mAsset->get("nokia2.png"), mRenderer);
|
success &= loadTextureFromFile(mTextureText, mAsset->get("smb2.png"), mRenderer);
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
@@ -126,7 +126,7 @@ void Game::draw()
|
|||||||
// mText->write(0, GAMECANVAS_CENTER_Y - (mText->getCharacterWidth() / 2), std::to_string(GAMECANVAS_HEIGHT), -1);
|
// mText->write(0, GAMECANVAS_CENTER_Y - (mText->getCharacterWidth() / 2), std::to_string(GAMECANVAS_HEIGHT), -1);
|
||||||
|
|
||||||
// Texto en el centro de la pantalla
|
// Texto en el centro de la pantalla
|
||||||
mText->writeCentered(GAMECANVAS_CENTER_X, 18 * 8, mRoom->getName(), -1);
|
mText->writeCentered(GAMECANVAS_CENTER_X, 18 * 8, mRoom->getName());
|
||||||
|
|
||||||
// Actualiza la pantalla
|
// Actualiza la pantalla
|
||||||
mScreen->blit();
|
mScreen->blit();
|
||||||
|
|||||||
Reference in New Issue
Block a user