Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 4, 2017, 3:17:59 PM (8 years ago)
Author:
jkindle
Message:

Fixed turning, added and finished Gumbas, added turnOnCollide for all NPC and items, added Flagstone - todo: add points on flagstone hit and go into a between lvl mode, then warp to lvl 2. AAH, and added onDeath fcts…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/SuperOrxoBros_FS17/src/modules/superorxobros/SOB.cc

    r11405 r11412  
    3838#include "core/command/Executor.h"
    3939#include "core/config/ConfigValueIncludes.h"
     40#include "core/Game.h"
    4041
    4142#include "gamestates/GSLevel.h"
     
    6869        points_=0;
    6970        timeLeft_=400.0;
     71       
     72        lvl_ = 1;
    7073
    7174    }
     
    8689    }
    8790
    88         void SOB::start()
     91    void SOB::start()
    8992    {
    9093        if (center_ != nullptr) // There needs to be a SOBCenterpoint, i.e. the area the game takes place.
     
    125128    }
    126129
     130    void SOB::restart() {
     131        cleanup();
     132
     133        // HACK
     134        Game::getInstance().popState();
     135        Game::getInstance().popState();
     136        Game::getInstance().requestStates("standalone, level");
     137
     138       
     139    }
    127140    void SOB::spawnPlayer(PlayerInfo* player)
    128141    {
     
    148161    }
    149162
    150 void SOB::tick(float dt)
     163    void SOB::tick(float dt)
    151164    {
    152165        SUPER(SOB, tick, dt);
    153166
    154         if (this->figure_ != nullptr && figure_->dead_)
     167        if (this->figure_ != nullptr && figure_->dead_) {
     168            info_ = "Game over. Press <Space> to restart";
    155169            orxout() << "DEED" << endl;
    156        
     170        }
     171       
    157172
    158        timeLeft_-=dt*2.5;
     173        timeLeft_-=dt*2.5;
    159174    }
    160175
Note: See TracChangeset for help on using the changeset viewer.