FINAL: v1
This commit is contained in:
@@ -4,12 +4,19 @@
|
||||
#include <renderer/texture.hpp>
|
||||
#include <renderer/font.hpp>
|
||||
#include <object/sound.hpp>
|
||||
#include <game/gamemanager.hpp>
|
||||
#include <game/agame/enemy.hpp>
|
||||
#include <game/agame/trash.hpp>
|
||||
|
||||
namespace Game::AGame {
|
||||
GAME_ENTITY(Background)
|
||||
public:
|
||||
void onWindowResized(int newWidth, int newHeight) override;
|
||||
private:
|
||||
Object::Sound mSound;
|
||||
float mEnemySpawnTimer = 0.f;
|
||||
float mTimeToSpawn = 5.f;
|
||||
int mW, mH;
|
||||
std::shared_ptr<Game::Renderer::Texture> mEnemyTex;
|
||||
std::shared_ptr<Game::Renderer::Texture> mTrashTex;
|
||||
END_GAME_ENTITY()
|
||||
}
|
||||
12
include/game/agame/enemy.hpp
Normal file
12
include/game/agame/enemy.hpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <game/gamemanager.hpp>
|
||||
#include <object/entity.hpp>
|
||||
#include <renderer/texture.hpp>
|
||||
#include <renderer/font.hpp>
|
||||
#include <object/sound.hpp>
|
||||
|
||||
namespace Game::AGame {
|
||||
GAME_ENTITY(Enemy)
|
||||
END_GAME_ENTITY()
|
||||
}
|
||||
@@ -10,5 +10,6 @@ GAME_ENTITY(Player)
|
||||
private:
|
||||
Object::Sound mSound;
|
||||
float mSpeed = 200.f; // Pixels per second
|
||||
float mHealth = 100.f;
|
||||
END_GAME_ENTITY()
|
||||
}
|
||||
Reference in New Issue
Block a user