function get_resource_class($pReload = FALSE)
 {
     if ($pReload || is_null($this->_resource_class)) {
         $this->_resource_class = Game_Model_Gameresourceclasses::getInstance()->get($this->resource_class);
     }
     return $this->_resource_class;
 }
 public static function getInstance()
 {
     if ($pReload || is_null(self::$_Instance)) {
         // process
         self::$_Instance = new self();
     }
     return self::$_Instance;
 }
 /**
  *
  */
 public function init()
 {
     if ($model = $this->_model()) {
         $this->view('game_type', $model->get_game_type());
         $this->view('resource_class', $model->get_resource_class());
     }
     if ($game_type = $this->getParam('game_type')) {
         $this->view('game_type', Game_Model_Gametypes::getInstance()->get($game_type));
     }
     if ($resource_class = $this->getParam('class')) {
         $class = Game_Model_Gameresourceclasses::getInstance()->get($resource_class);
         if ($class && !$game_type) {
             $this->view('game_type', $class->game_type());
         }
         $this->view('resource_class', $class);
     }
 }
示例#4
0
 function get_resource_classes($pReload = FALSE)
 {
     if ($pReload || is_null($this->_resource_classes)) {
         // process
         $params = array('game_type' => $this->identity(), 'active' => 1);
         $this->_resource_classes = Game_Model_Gameresourceclasses::getInstance()->find($params, 'rank');
     }
     return $this->_resource_classes;
 }