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

Screen3.h

Committer:
taylorza
Date:
2015-02-16
Revision:
14:b4884a31069e
Parent:
4:45ff7fc8a431

File content as of revision 14:b4884a31069e:

#ifndef __SCREEN3_H__
#define __SCREEN3_H__

class Screen3 : public Scene
{
public:
    Screen3() :
        _player(),
        _enemy1(2, PatrollingEnemy::UpDown),
        _enemy2(2, PatrollingEnemy::UpDown)              
    {
        Game::Surface.clearScreen();
                        
        addGameObject(&_enemy1);
        addGameObject(&_enemy2);                       
        addGameObject(&_player);
        
        restartScreen();
    }
    
    virtual void restartScreen()
    {
        _player.setStartPosition(136, 96);        
        _enemy1.setStartPosition(24, 16);        
        _enemy2.setStartPosition(88, 32);        
                
        setPosition(0, 8);
        setMap(Maps::Screen3, 20, 15, blocks, sprites);
        
        Scene::restartScreen();
    }
    
private:    
    Player          _player;
    PatrollingEnemy _enemy1;
    PatrollingEnemy _enemy2;                    
};

#endif //__SCREEN3_H__