|
楼主 |
发表于 2011-3-6 00:08:26
|
显示全部楼层
PS:重复set同名Timer,会造成泄漏么?
当然,在行为结束时对timer执行了kill
但是在行为持续期间,2个Timer是重复Set的,会不会泄漏?
[code=xml]
<CActorSimple id="UnitChangeColor_Actor">
<On Terms="Behavior.UnitMissDamage_Behavior.On" Send="Create"/>
<On Terms="Behavior.UnitMissDamage_Behavior.Off" Send="Destroy"/>
<On Terms="Behavior.UnitMissDamage_Behavior.On" Target="_Unit" Send="SetTintColor {255,0,0 2.000000}"/>
<On Terms="Behavior.UnitMissDamage_Behavior.Off" Target="_Unit" Send="SetTintColor 255,255,255"/>
<On Terms="Behavior.UnitMissDamage_Behavior.On" Send="TimerSet 0.200000 RedTimer01"/>
<On Terms="TimerExpired; TimerName RedTimer01" Target="_Unit" Send="SetTintColor 255,255,255"/>
<On Terms="TimerExpired; TimerName RedTimer01" Send="TimerSet 0.200000 RedTimer02"/>
<On Terms="TimerExpired; TimerName RedTimer02" Target="_Unit" Send="SetTintColor {255,0,0 2.000000}"/>
<On Terms="TimerExpired; TimerName RedTimer02" Send="TimerSet 0.200000 RedTimer01"/>
<On Terms="Behavior.UnitMissDamage_Behavior.Off" Send="TimerKill RedTimer01"/>
<On Terms="Behavior.UnitMissDamage_Behavior.Off" Send="TimerKill RedTimer02"/>
</CActorSimple>
[/code] |
|