Files
DemoGame/src/Game/Entities/Box.cpp
Redacted 6664925621 Refactor & More.
Changed the entity system to utilize mix-ins.

Added instanced sprites.

Texture support.
2025-01-03 19:28:58 -05:00

18 lines
460 B
C++

#include <Game/entity/Box.h>
#include <Engine/Globals.h>
#include <JGL/JGL.h>
void Game::Box::Render() {
J2D::FillRect(Colors::Red, Vector2(position), {20, 20});
}
void Game::Box::Update() {
if (Globals::Window->IsKeyDown(Keys::W))
MoveY(-500);
if (Globals::Window->IsKeyDown(Keys::S))
MoveY(500);
if (Globals::Window->IsKeyDown(Keys::A))
MoveX(-500);
if (Globals::Window->IsKeyDown(Keys::D))
MoveX(500);
}