I want to do a game project outside of school whenever I have some spare time. Want to try and to a simple version of megaman x. felt like a good idea at first but already starting to regret it
Today all I did was editing a sprite sheet and tried to load the animations.
Thing is, there's a looooot of sequences. I'm at 21 now and that's just for moving to the right. There will probably be a few more added too.
The sequences also don't have the same amount of frames so I can't loop through them in the constructor so atm it's a whole lot of this
Code: Select all
animations.emplace_back(Animation(0, 0, 100, 100, 4, sprite, 0.1f, Color(0, 128, 128)));
animations.emplace_back(Animation(400, 0, 100, 100, 1, sprite, 0.1f, Color(0, 128, 128)));
animations.emplace_back(Animation(0, 100, 100, 100, 10, sprite, 0.1f, Color(0, 128, 128)));
animations.emplace_back(Animation(0, 200, 100, 100, 2, sprite, 0.1f, Color(0, 128, 128)));
animations.emplace_back(Animation(200, 200, 100, 100, 2, sprite, 0.1f, Color(0, 128, 128)));
animations.emplace_back(Animation(400, 200, 100, 100, 1, sprite, 0.1f, Color(0, 128, 128)));
animations.emplace_back(Animation(500, 200, 100, 100, 2, sprite, 0.1f, Color(0, 128, 128)));
animations.emplace_back(Animation(700, 200, 100, 100, 2, sprite, 0.1f, Color(0, 128, 128)));
animations.emplace_back(Animation(0, 300, 100, 100, 2, sprite, 0.1f, Color(0, 128, 128)));
animations.emplace_back(Animation(200, 300, 100, 100, 4, sprite, 0.1f, Color(0, 128, 128)));
animations.emplace_back(Animation(0, 400, 100, 100, 1, sprite, 0.1f, Color(0, 128, 128)));
animations.emplace_back(Animation(100, 400, 100, 100, 10, sprite, 0.1f, Color(0, 128, 128)));
animations.emplace_back(Animation(0, 500, 100, 100, 2, sprite, 0.1f, Color(0, 128, 128)));
animations.emplace_back(Animation(200, 500, 100, 100, 2, sprite, 0.1f, Color(0, 128, 128)));
animations.emplace_back(Animation(400, 500, 100, 100, 1, sprite, 0.1f, Color(0, 128, 128)));
animations.emplace_back(Animation(500, 500, 100, 100, 2, sprite, 0.1f, Color(0, 128, 128)));
animations.emplace_back(Animation(700, 500, 100, 100, 1, sprite, 0.1f, Color(0, 128, 128)));
animations.emplace_back(Animation(0, 600, 100, 100, 2, sprite, 0.1f, Color(0, 128, 128)));
animations.emplace_back(Animation(200, 600, 100, 100, 4, sprite, 0.1f, Color(0, 128, 128)));
animations.emplace_back(Animation(0, 700, 100, 100, 12, sprite, 0.1f, Color(0, 128, 128)));
animations.emplace_back(Animation(0, 800, 100, 100, 12, sprite, 0.1f, Color(0, 128, 128)));