Parsing for SpriteComponent JSON
This commit is contained in:
@@ -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, "");
|
||||
|
||||
Reference in New Issue
Block a user