Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //----------IN THE FORM----------
- timer animations = new timer();
- t.Interval = 100; //TO BE ADJUSTED
- int animCount; //universal?
- animCount = 0;
- animations_tick()
- {
- animCount++;
- }
- //----------IN THE OBJECT----------
- public void Draw(g, animnimCount)
- {
- switch (animCount % anims)
- {
- default: g.DrawImage(Properties.Resources.playerShip_anim0); break;
- case 1: g.DrawImage(Properties.Resources.playerShip_anim1); break;
- case 2: g.DrawImage(Properties.Resources.playerShip_anim2); break;
- case 3: g.DrawImage(Properties.Resources.playerShip_anim3); break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement