box collider
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <renderer/texture.hpp>
|
||||
#include <renderer/font.hpp>
|
||||
#include <game/agame/sampletextbox.hpp>
|
||||
#include <object/components/boxcollider.hpp>
|
||||
|
||||
using namespace Game;
|
||||
|
||||
@@ -22,7 +23,8 @@ int main() {
|
||||
|
||||
//Object::Transform t1{100.f, 100.f, 0.f, 1.f, 1.f};
|
||||
State::GameState::getInstance().addEntity(std::make_unique<AGame::Background>("BG", std::make_shared<Game::Renderer::Texture>("../resources/bgtest.png", window.getRenderer()->getSDLRenderer()), Object::DEFAULT_TRANSFORM));
|
||||
State::GameState::getInstance().addEntity(std::make_unique<AGame::Player>("Player", std::make_shared<Game::Renderer::Texture>("../resources/l3ladja.png", window.getRenderer()->getSDLRenderer()), Object::DEFAULT_TRANSFORM));
|
||||
Object::Entity* player = State::GameState::getInstance().addEntity(std::make_unique<AGame::Player>("Player", std::make_shared<Game::Renderer::Texture>("../resources/l3ladja.png", window.getRenderer()->getSDLRenderer()), Object::DEFAULT_TRANSFORM));
|
||||
player->addComponent<Object::Components::BoxCollider>();
|
||||
//State::GameState::getInstance().addEntity(std::make_unique<AGame::Player>("Player2", std::make_shared<Game::Renderer::Font>("../resources/roboto.ttf", window.getRenderer()->getSDLRenderer(), 128, "Roboto"), t1));
|
||||
|
||||
window.run();
|
||||
|
||||
Reference in New Issue
Block a user