mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Event Handling Optimization
-- Created a HandleEvent method -- Created an UnHandleEvent method
This commit is contained in:
@@ -453,13 +453,13 @@ function SET_BASE:_FilterStart()
|
||||
end
|
||||
end
|
||||
|
||||
self.HandleEvent( EVENTS.Birth, self._EventOnBirth )
|
||||
self.HandleEvent( EVENTS.Dead, self._EventOnDeadOrCrash )
|
||||
self.HandleEvent( EVENTS.Crash, self._EventOnDeadOrCrash )
|
||||
self:HandleEvent( EVENTS.Birth, self._EventOnBirth )
|
||||
self:HandleEvent( EVENTS.Dead, self._EventOnDeadOrCrash )
|
||||
self:HandleEvent( EVENTS.Crash, self._EventOnDeadOrCrash )
|
||||
|
||||
-- Follow alive players and clients
|
||||
self.HandleEvent( EVENTS.PlayerEnterUnit, self._EventOnPlayerEnterUnit )
|
||||
self.HandleEvent( EVENTS.PlayerLeaveUnit, self._EventOnPlayerLeaveUnit )
|
||||
self:HandleEvent( EVENTS.PlayerEnterUnit, self._EventOnPlayerEnterUnit )
|
||||
self:HandleEvent( EVENTS.PlayerLeaveUnit, self._EventOnPlayerLeaveUnit )
|
||||
|
||||
|
||||
return self
|
||||
|
||||
Reference in New Issue
Block a user