mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-31 07:44:30 +00:00
[FIXED] SPAWN.BeforeTemplateSpawnFunc
This commit is contained in:
@@ -1883,7 +1883,7 @@ function SPAWN:SpawnWithIndex( SpawnIndex, NoBirth )
|
|||||||
|
|
||||||
|
|
||||||
if self.BeforeTemplateSpawnFunc then
|
if self.BeforeTemplateSpawnFunc then
|
||||||
self:BeforeTemplateSpawnFunc(SpawnTemplate, SpawnIndex)
|
self.BeforeTemplateSpawnFunc(SpawnTemplate, SpawnIndex)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -2011,14 +2011,14 @@ end
|
|||||||
-- -- Declare SpawnObject and call a function when a new Group is spawned.
|
-- -- Declare SpawnObject and call a function when a new Group is spawned.
|
||||||
-- local SpawnObject = SPAWN:New( "SpawnObject" )
|
-- local SpawnObject = SPAWN:New( "SpawnObject" )
|
||||||
-- :InitLimit( 2, 10 )
|
-- :InitLimit( 2, 10 )
|
||||||
-- :OnBeforeSpawnGroup( function( SpawnTemplate )
|
-- :OnBeforeTemplateSpawnGroup( function( SpawnTemplate )
|
||||||
-- Tweaking the template units
|
-- Tweaking the template units
|
||||||
-- end
|
-- end
|
||||||
-- )
|
-- )
|
||||||
-- :SpawnScheduled( 300, 0.3 )
|
-- :SpawnScheduled( 300, 0.3 )
|
||||||
--
|
--
|
||||||
function SPAWN:OnBeforeTemplateSpawnGroup( BeforeTemplateSpawnFunc )
|
function SPAWN:OnBeforeTemplateSpawnGroup( BeforeTemplateSpawnFunc )
|
||||||
--self:F( "OnBeforeSpawnGroup" )
|
--self:F( "OnBeforeTemplateSpawnGroup" )
|
||||||
|
|
||||||
self.BeforeTemplateSpawnFunc = BeforeTemplateSpawnFunc
|
self.BeforeTemplateSpawnFunc = BeforeTemplateSpawnFunc
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user