Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 26, 2009, 2:15:08 PM (15 years ago)
Author:
rgrieder
Message:

Loading and unloading graphics automatically: As soon as a GameState requires graphics (defined at the GameState declaration with a bool) it gets loaded. And vice versa.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource/src/core/GameState.cc

    r3280 r3355  
    3838#include "util/Exception.h"
    3939#include "util/OrxAssert.h"
     40#include "Game.h"
    4041
    4142namespace orxonox
     
    4546        Constructor only initialises variables and sets the name permanently.
    4647    */
    47     GameState::GameState(const GameStateConstrParams& params)
    48         : name_(params.name)
    49         , bIgnoreTickTime_(params.bIgnoreTickTime)
     48    GameState::GameState(const GameStateInfo& info)
     49        : info_(info)
    5050        , parent_(0)
    5151    {
     
    6565    {
    6666        OrxAssert(this->activity_.active == false, "Deleting an active GameState is a very bad idea..");
     67    }
     68
     69    const std::string& GameState::getName() const
     70    {
     71        return info_.stateName;
    6772    }
    6873
     
    107112        else
    108113        {
    109             ThrowException(GameState, "Game state '" + name_ + "' doesn't have a child named '"
     114            ThrowException(GameState, "Game state '" + this->getName() + "' doesn't have a child named '"
    110115                + state->getName() + "'.");
    111116        }
Note: See TracChangeset for help on using the changeset viewer.