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

Screen4.h

Committer:
taylorza
Date:
2015-02-16
Revision:
16:f9227904afc4

File content as of revision 16:f9227904afc4:

#ifndef __SCREEN4_H__
#define __SCREEN4_H__

class Screen4 : public Scene
{
public:
    Screen4() :
        _player(),
        _enemy1(3, PatrollingEnemy::LeftRight),
        _enemy2(4)              
    {
        Game::Surface.clearScreen();
                        
        addGameObject(&_enemy1);
        addGameObject(&_enemy2);                       
        addGameObject(&_player);
        
        restartScreen();
    }
    
    virtual void restartScreen()
    {
        _player.setStartPosition(10, 16);  
              
        _enemy1.setStartPosition(72, 48);  
        _enemy1.setCollisionRect(0, 6, 16, 16);
        
        _enemy2.setStartPosition(88, 78);       
                
        setPosition(0, 8);
        setMap(Maps::Screen4, 20, 15, blocks, sprites);
        
        Scene::restartScreen();
    }
    
private:    
    Player              _player;
    PatrollingEnemy     _enemy1;
    BouncingEnemy       _enemy2;
};

#endif //__SCREEN4_H__