Change demo to showcase instancing.
This commit is contained in:
@@ -1,17 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <Engine/types/entity/Entity.h>
|
||||
#include <Engine/types/entity/mixins/Movable.h>
|
||||
#include <Engine/types/entity/mixins/Renderable.h>
|
||||
#include <Engine/types/entity/InstancedSprite.h>
|
||||
|
||||
namespace Game {
|
||||
class Box;
|
||||
}
|
||||
|
||||
class Game::Box final : public Engine::Entity, public Engine::Renderable, public Engine::Movable {
|
||||
class Game::Box final : public Engine::InstancedSprite {
|
||||
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) {}
|
||||
explicit Box(const Vector2& position, unsigned int depth = 0, float rad_rotation = 0.0f) : Engine::InstancedSprite(position, depth, "assets/sprites/Re3D.png", rad_rotation) {}
|
||||
};
|
Reference in New Issue
Block a user