Refactor & More.
Changed the entity system to utilize mix-ins. Added instanced sprites. Texture support.
This commit is contained in:
17
include/Game/entity/Box.h
Normal file
17
include/Game/entity/Box.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <Engine/types/entity/Entity.h>
|
||||
#include <Engine/types/entity/mixins/Movable.h>
|
||||
#include <Engine/types/entity/mixins/Renderable.h>
|
||||
|
||||
namespace Game {
|
||||
class Box;
|
||||
}
|
||||
|
||||
class Game::Box final : public Engine::Entity, public Engine::Renderable, public Engine::Movable {
|
||||
public:
|
||||
void Render() final;
|
||||
void Update() final;
|
||||
public:
|
||||
explicit Box(const Vector2& position, unsigned int depth = 0, float rotation = 0.0f) : Renderable(depth), Movable(position, rotation) {}
|
||||
};
|
14
include/Game/entity/DemoGameHud.h
Normal file
14
include/Game/entity/DemoGameHud.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <Engine/types/entity/Hud.h>
|
||||
|
||||
namespace Game {
|
||||
class DemoGameHud;
|
||||
}
|
||||
|
||||
class Game::DemoGameHud : public Engine::Hud {
|
||||
public:
|
||||
void Render() override;
|
||||
public:
|
||||
DemoGameHud() : Hud() {}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user