Example #1
0
 /**
  * Creates a new instance of L4D2Weapon based on the assigned XML data
  * @param $weaponData
  */
 public function __construct($weaponData)
 {
     parent::__construct($weaponData);
     $this->damage = (int) $weaponData->damage;
     $this->killPercentage = (string) $weaponData->pctkills;
     $this->weaponGroup = $weaponGroup['group'];
 }
Example #2
0
 /**
  * Creates a new instance of a weapon based on the given XML data
  *
  * @param \SimpleXMLElement $weaponData The XML data of this weapon
  */
 public function __construct(\SimpleXMLElement $weaponData)
 {
     parent::__construct($weaponData);
     $this->damage = (int) $weaponData->damage;
     $this->killPercentage = (double) $weaponData->pctkills * 0.01;
     $this->weaponGroup = $weaponData['group'];
 }
Example #3
0
 /**
  * Creates a new instance of a weapon based on the given XML data
  *
  * @param \SimpleXMLElement $weaponData The XML data for this weapon
  */
 public function __construct(\SimpleXMLElement $weaponData)
 {
     parent::__construct($weaponData);
     $this->killPercentage = (double) $weaponData->killpct * 0.01;
 }
Example #4
0
 /**
  * Creates a new instance of L4DWeapon based on the assigned XML data
  * @param $weaponData
  */
 public function __construct($weaponData)
 {
     parent::__construct($weaponData);
     $this->killPercentage = (string) $weaponData->killpct;
 }