WayPoint-Callback already takes a Structure
This commit is contained in:
parent
9a7952811a
commit
0db1636a38
@ -102,11 +102,9 @@ class TrackManiaCallbacks implements CallbackListener {
|
|||||||
/**
|
/**
|
||||||
* Trigger the three different Types of Callbacks
|
* Trigger the three different Types of Callbacks
|
||||||
*
|
*
|
||||||
* @param $data
|
* @param \ManiaControl\Callbacks\Structures\TrackMania\OnWayPointEventStructure $structure
|
||||||
*/
|
*/
|
||||||
public function handleWayPointCallback($data) {
|
public function handleWayPointCallback(OnWayPointEventStructure $structure) {
|
||||||
$structure = new OnWayPointEventStructure($this->maniaControl, $data);
|
|
||||||
|
|
||||||
if ($structure->getIsEndRace()) {
|
if ($structure->getIsEndRace()) {
|
||||||
$this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::TM_ONFINISHLINE, $structure);
|
$this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::TM_ONFINISHLINE, $structure);
|
||||||
} else if ($structure->getIsEndLap()) {
|
} else if ($structure->getIsEndLap()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user