コード例 #1
0
ファイル: Ship.class.php プロジェクト: sp1ke77/wh40k
 public function __construct(array $kwargs)
 {
     parent::__construct($kwargs);
     if (array_key_exists('speed', $kwargs)) {
         $this->setSpeed($kwargs['speed']);
     }
     if (array_key_exists('max_shield', $kwargs)) {
         $this->_max_shield = intval($kwargs['max_shield']);
     }
     if (array_key_exists('power', $kwargs)) {
         $this->setPower($kwargs['power']);
     }
     if (array_key_exists('orientation', $kwargs)) {
         $this->setOrientation($kwargs['orientation']);
     }
     $this->_weapons = array();
     if (array_key_exists('weapons', $kwargs)) {
         $this->setWeapons($kwargs['weapons']);
     }
 }
コード例 #2
0
ファイル: game.php プロジェクト: Geekfish/oshi-php
 /**
  * Set up the initial pawn set
  *
  */
 public function SetUpPawns()
 {
     Pawn::GenerateSet();
 }