Integrated new content, Fixed Map Collision

This commit is contained in:
2021-01-30 20:14:26 -05:00
parent 3f12951802
commit 697ab6f8fc
35 changed files with 223 additions and 453 deletions

View File

@ -96,11 +96,8 @@ public:
int toFrame = cJSON_GetObjectItem(animItem, "to")->valueint;
Animation anim = Animation(fromFrame,toFrame,100);
animations.emplace(name, anim);
// printf("Playing animation named: %s fromFrame:%d toFrame:%d \n",name,fromFrame,toFrame);
Play(name);
// printf("Animation name: \n%s\n",name);
// printf("animation.frames: %d\n", animations[name].frames);
// printf("animations.index: %d\n", animations[name].index);
// printf("animations.speed: %d\n", animations[name].speed);
}
// if(!animations.empty()){
@ -108,9 +105,12 @@ public:
// }else{
// printf("No animations\n");
// }
// Play("S-Fly");
setTex(id);
// Play("idle");
}
Animation Idle = Animation(0,2,100);
animations.emplace("Idle", Idle);
Play("Idle");
setTex(id);
}
SpriteComponent(std::string id, SpriteType sType, char fontLetter, int letterW, int letterH, int letterScale)