public static function getInstance() { if (!isset(self::$Instance)) { self::$Instance = new self(); } return self::$Instance; }
public function __construct($monster_id) { MonsterData::getInstance()->setId($monster_id); $this->name = MonsterData::getInstance()->getName(); $this->paramaters = MonsterData::getInstance()->getParam(); $this->hp = $this->paramaters['hp']; $this->atk = $this->paramaters['atk']; $this->def = $this->paramaters['def']; $this->mp = $this->paramaters['mp']; $this->actions = MonsterData::getInstance()->getAction(); }