mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Dead Event
**EVENT** - Improved handling of delayed dead event **SPAWN** - Improved handling of delayed dead event
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
--- @type UNIT
|
||||
-- @field #string ClassName Name of the class.
|
||||
-- @field #string UnitName Name of the unit.
|
||||
-- @field #string GroupName Name of the group the unit belongs to.
|
||||
-- @extends Wrapper.Controllable#CONTROLLABLE
|
||||
|
||||
--- For each DCS Unit object alive within a running mission, a UNIT wrapper object (instance) will be created within the _@{DATABASE} object.
|
||||
@@ -86,10 +87,11 @@
|
||||
-- * Use the @{#UNIT.IsLOS}() method to check if the given unit is within line of sight.
|
||||
--
|
||||
--
|
||||
-- @field #UNIT UNIT
|
||||
-- @field #UNIT
|
||||
UNIT = {
|
||||
ClassName="UNIT",
|
||||
UnitName=nil,
|
||||
GroupName=nil,
|
||||
}
|
||||
|
||||
|
||||
@@ -110,11 +112,17 @@ UNIT = {
|
||||
function UNIT:Register( UnitName )
|
||||
|
||||
-- Inherit CONTROLLABLE.
|
||||
local self = BASE:Inherit( self, CONTROLLABLE:New( UnitName ) )
|
||||
local self = BASE:Inherit( self, CONTROLLABLE:New( UnitName ) ) --#UNIT
|
||||
|
||||
-- Set unit name.
|
||||
self.UnitName = UnitName
|
||||
|
||||
local unit=Unit.getByName(self.UnitName)
|
||||
|
||||
if unit then
|
||||
self.GroupName=unit:getGroup():getName()
|
||||
end
|
||||
|
||||
-- Set event prio.
|
||||
self:SetEventPriority( 3 )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user