split onHit / onNearMiss / onArmorEmpty (with common base)
This commit is contained in:
32
core/Callbacks/Structures/ShootMania/OnNearMissStructure.php
Normal file
32
core/Callbacks/Structures/ShootMania/OnNearMissStructure.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace ManiaControl\Callbacks\Structures\ShootMania;
|
||||
|
||||
|
||||
use ManiaControl\ManiaControl;
|
||||
|
||||
/**
|
||||
* Structure Class for the OnNearMiss Structure Callback
|
||||
*
|
||||
* @author ManiaControl Team <mail@maniacontrol.com>
|
||||
* @copyright 2014-2017 ManiaControl Team
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
class OnNearMissStructure extends OnHitNearMissArmorEmptyBaseStructure {
|
||||
private $distance;
|
||||
|
||||
public function __construct(ManiaControl $maniaControl, array $data) {
|
||||
parent::__construct($maniaControl, $data);
|
||||
|
||||
$this->distance = $this->getPlainJsonObject()->distance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the distance
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getDistance() {
|
||||
return $this->distance;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user