Platform game written for the GHI/OutrageousCircuits RETRO game device. Navigate the caves collecting all the pickups and avoiding the creatures and haunted mine carts that patrol the caves. Oh and remember to watch out for the poisonous plants... This game demonstrates the ability to have multiple animated sprites where the sprites can overlap the background environment. See how the player moves past the fence and climbs the wall in the 3rd screen.

Dependencies:   mbed

Committer:
taylorza
Date:
Mon Feb 16 03:46:57 2015 +0000
Revision:
16:f9227904afc4
Parent:
14:b4884a31069e
Added a 4th game screen

Who changed what in which revision?

UserRevisionLine numberNew contents of line
taylorza 4:45ff7fc8a431 1 #ifndef __SCREEN1_H__
taylorza 4:45ff7fc8a431 2 #define __SCREEN1_H__
taylorza 4:45ff7fc8a431 3
taylorza 4:45ff7fc8a431 4 class Screen1 : public Scene
taylorza 4:45ff7fc8a431 5 {
taylorza 4:45ff7fc8a431 6 public:
taylorza 4:45ff7fc8a431 7 Screen1() :
taylorza 4:45ff7fc8a431 8 _player(),
taylorza 4:45ff7fc8a431 9 _enemy1(3, PatrollingEnemy::LeftRight),
taylorza 4:45ff7fc8a431 10 _enemy2(4)
taylorza 4:45ff7fc8a431 11 {
taylorza 4:45ff7fc8a431 12 addGameObject(&_enemy1);
taylorza 4:45ff7fc8a431 13 addGameObject(&_enemy2);
taylorza 4:45ff7fc8a431 14 addGameObject(&_player);
taylorza 4:45ff7fc8a431 15
taylorza 4:45ff7fc8a431 16 restartScreen();
taylorza 4:45ff7fc8a431 17 }
taylorza 4:45ff7fc8a431 18
taylorza 4:45ff7fc8a431 19 virtual void restartScreen()
taylorza 4:45ff7fc8a431 20 {
taylorza 14:b4884a31069e 21 _player.setStartPosition(130, 96);
taylorza 4:45ff7fc8a431 22
taylorza 14:b4884a31069e 23 _enemy1.setStartPosition(80, 72);
taylorza 4:45ff7fc8a431 24 _enemy1.setCollisionRect(0, 6, 16, 16);
taylorza 4:45ff7fc8a431 25
taylorza 14:b4884a31069e 26 _enemy2.setStartPosition(8, 8);
taylorza 4:45ff7fc8a431 27
taylorza 4:45ff7fc8a431 28 setPosition(0, 8);
taylorza 4:45ff7fc8a431 29 setMap(Maps::Screen1, 20, 15, blocks, sprites);
taylorza 4:45ff7fc8a431 30
taylorza 4:45ff7fc8a431 31 Scene::restartScreen();
taylorza 4:45ff7fc8a431 32 }
taylorza 4:45ff7fc8a431 33
taylorza 4:45ff7fc8a431 34 private:
taylorza 4:45ff7fc8a431 35 Player _player;
taylorza 4:45ff7fc8a431 36 PatrollingEnemy _enemy1;
taylorza 4:45ff7fc8a431 37 BouncingEnemy _enemy2;
taylorza 4:45ff7fc8a431 38 };
taylorza 4:45ff7fc8a431 39
taylorza 4:45ff7fc8a431 40 #endif //__SCREEN1_H__