TrackManiaControl/core/Callbacks/Structures/ShootMania/OnHitStructure.php

41 lines
907 B
PHP
Raw Normal View History

<?php
namespace ManiaControl\Callbacks\Structures\ShootMania;
use ManiaControl\ManiaControl;
/**
* Structure Class for the OnHit Structure Callback
*
2017-04-07 23:26:35 +02:00
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class OnHitStructure extends OnHitNearMissArmorEmptyBaseStructure {
private $damage;
2017-04-07 23:26:35 +02:00
/**
* OnHitStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param array $data
*/
public function __construct(ManiaControl $maniaControl, array $data) {
parent::__construct($maniaControl, $data);
$this->damage = $this->getPlainJsonObject()->damage;
}
/**
* < Amount of Damage done by the hit (only on onHit)
*
2017-04-07 23:26:35 +02:00
* @api
* @return int
*/
public function getDamage() {
return $this->damage;
}
}