Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10574


Ignore:
Timestamp:
Sep 9, 2015, 1:49:55 PM (9 years ago)
Author:
landauf
Message:

removed some init() functions, integrated them directly into the constructor (and it's not necessary to call init() again when a gametype starts)

Location:
code/branches/core7/src/modules
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/modules/dodgerace/DodgeRace.cc

    r10557 r10574  
    4444    {
    4545        RegisterObject(DodgeRace);
    46         init();
    47         this->numberOfBots_ = 0; //sets number of default bots temporarly to 0
    48         this->center_ = 0;
    49 
    50         this->setHUDTemplate("DodgeRaceHUD");
    51     }
    52 
    53     void DodgeRace::init()
    54     {
     46
    5547        bEndGame = false;
    5648        lives = 1;
     
    6658        //enemySpawnTimer.setTimer(3.5f, true, createExecutor(createFunctor(&DodgeRace::spawnEnemy, this)));
    6759        comboTimer.setTimer(3.0f, true, createExecutor(createFunctor(&DodgeRace::comboControll, this)));
     60        this->numberOfBots_ = 0; //sets number of default bots temporarly to 0
     61        this->center_ = 0;
     62
     63        this->setHUDTemplate("DodgeRaceHUD");
    6864    }
    6965
     
    167163    {
    168164        orxout() << "start" << endl;
    169         init();
    170165        for(unsigned int i=0; i< cubeList.size();i++)
    171166        {
     
    198193        /*
    199194        orxout() << "prespawn" << endl;
    200         init();
    201195        for(int i=0; i< cubeList.size();i++)
    202196        {
  • code/branches/core7/src/modules/dodgerace/DodgeRace.h

    r10557 r10574  
    6868       public:
    6969            DodgeRace(Context* context);
    70 
    71             void init();
    7270
    7371            virtual void start();
  • code/branches/core7/src/modules/invader/Invader.cc

    r10557 r10574  
    6262        this->numberOfBots_ = 0; //sets number of default bots temporarly to 0
    6363        this->center_ = 0;
    64         init();
    65         this->setHUDTemplate("InvaderHUD");
    66     }
    67 
    68     void Invader::init()
    69     {
    7064        bEndGame = false;
    7165        lives = 3;
     
    7872        enemySpawnTimer.setTimer(3.5f, true, createExecutor(createFunctor(&Invader::spawnEnemy, this)));
    7973        comboTimer.setTimer(3.0f, true, createExecutor(createFunctor(&Invader::comboControll, this)));
     74        this->setHUDTemplate("InvaderHUD");
    8075    }
    8176
     
    155150    void Invader::start()
    156151    {
    157         init();
    158152        // Set variable to temporarily force the player to spawn.
    159153        this->bForceSpawn_ = true;
  • code/branches/core7/src/modules/invader/Invader.h

    r10557 r10574  
    7171            // checks if multiplier should be reset.
    7272            void comboControll();
    73             void init();
    7473            int lives;
    7574            int multiplier;
  • code/branches/core7/src/modules/objects/Planet.cc

    r9675 r10574  
    8585
    8686        SUPER(Planet, tick, dt);
    87     }
    88 
    89     void Planet::init()
    90     {
    9187    }
    9288
  • code/branches/core7/src/modules/objects/Planet.h

    r9667 r10574  
    5252            virtual ~Planet();
    5353
    54             void init();
    5554            virtual void tick(float dt);
    5655
Note: See TracChangeset for help on using the changeset viewer.