Event Handling improved

This commit is contained in:
FlightControl
2017-02-07 10:34:16 +01:00
parent e9a4429f7a
commit 154f729788
16 changed files with 432 additions and 64241 deletions

View File

@@ -66,7 +66,7 @@ function COMMANDCENTER:New( CommandCenterPositionable, CommandCenterName )
self.Missions = {}
self:EventOnBirth(
self:HandleEvent( EVENTS.Birth,
--- @param #COMMANDCENTER self
--- @param Core.Event#EVENTDATA EventData
function( self, EventData )
@@ -94,7 +94,7 @@ function COMMANDCENTER:New( CommandCenterPositionable, CommandCenterName )
-- - Set the correct menu.
-- - Assign the PlayerUnit to the Task if required.
-- - Send a message to the other players in the group that this player has joined.
self:EventOnPlayerEnterUnit(
self:HandleEvent( EVENTS.PlayerEnterUnit,
--- @param #COMMANDCENTER self
-- @param Core.Event#EVENTDATA EventData
function( self, EventData )
@@ -111,7 +111,7 @@ function COMMANDCENTER:New( CommandCenterPositionable, CommandCenterName )
-- Handle when a player leaves a slot and goes back to spectators ...
-- The PlayerUnit will be UnAssigned from the Task.
-- When there is no Unit left running the Task, the Task goes into Abort...
self:EventOnPlayerLeaveUnit(
self:HandleEvent( EVENTS.PlayerLeaveUnit,
--- @param #TASK self
-- @param Core.Event#EVENTDATA EventData
function( self, EventData )
@@ -126,7 +126,7 @@ function COMMANDCENTER:New( CommandCenterPositionable, CommandCenterName )
-- Handle when a player leaves a slot and goes back to spectators ...
-- The PlayerUnit will be UnAssigned from the Task.
-- When there is no Unit left running the Task, the Task goes into Abort...
self:EventOnCrash(
self:HandleEvent( EVENTS.Crash,
--- @param #TASK self
-- @param Core.Event#EVENTDATA EventData
function( self, EventData )