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

Screen2.h

Committer:
taylorza
Date:
2015-02-16
Revision:
16:f9227904afc4
Parent:
14:b4884a31069e

File content as of revision 16:f9227904afc4:

#ifndef __SCREEN2_H__
#define __SCREEN2_H__

class Screen2 : public Scene
{
public:
    Screen2() :
        _player(),
        _enemy1(4),
        _enemy2(4)              
    {
        Game::Surface.clearScreen();
        
        addGameObject(&_enemy1);
        addGameObject(&_enemy2);        
        addGameObject(&_player);
        
        restartScreen();
    }
    
    virtual void restartScreen()
    {
        _player.setStartPosition(8, 8);        
        _enemy1.setStartPosition(140, 8);        
        _enemy2.setStartPosition(90, 32);        
        
        setPosition(0, 32);
        setMap(Maps::Screen2, 20, 7, blocks, sprites);
        
        Scene::restartScreen();
    }
    
private:    
    Player        _player;
    BouncingEnemy _enemy1;
    BouncingEnemy _enemy2;            
};

#endif //__SCREEN2_H__