Parsing for SpriteComponent JSON

This commit is contained in:
Alan Youngblood
2023-08-27 19:46:16 -04:00
parent 9218c9a4b1
commit 15e6abc102
5 changed files with 18 additions and 8 deletions

View File

@@ -180,7 +180,8 @@ void Game::init(const char *title, int width, int height, bool fullscreen, int g
//ecs implementation
player.addComponent<TransformComponent>(150*gScale,100*gScale,32,32,globalScale,2); // 180,120
player.addComponent<SpriteComponent>("player", SpriteComponent::spriteAnimation, "assets/textures/actors/kaijuturtle.json");
std::string playerJson = Game::projPath + "assets/textures/actors/kaijuturtle.json";
player.addComponent<SpriteComponent>("player", SpriteComponent::spriteAnimation, playerJson);
// player.addComponent<PlayerController>(0.0,0.0,false,false,Vector2D().Zero());
player.addComponent<ColliderComponent>("player",20*globalScale,20*globalScale, true, 0*globalScale,0*globalScale, "");