|
@@ -187,6 +187,24 @@ namespace CommonAI.Zone.ZoneEditor.EventTrigger
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ [DescAttribute("复活单位", "单位")]
|
|
|
+ public class ReviveUnitAction : AbstractAction
|
|
|
+ {
|
|
|
+ [DescAttribute("单位")]
|
|
|
+ public UnitValue Unit = new UnitValue.Trigging();
|
|
|
+ public override string ToString()
|
|
|
+ {
|
|
|
+ return string.Format("复活({0})", Unit);
|
|
|
+ }
|
|
|
+ override public void DoAction(EventTriggerAdapter api, EventArguments args)
|
|
|
+ {
|
|
|
+ InstanceUnit unit = Unit.GetValue(api, args);
|
|
|
+ if (unit != null && unit.is_dead())
|
|
|
+ {
|
|
|
+ unit.startRebirth();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
[DescAttribute("直接移除单位", "单位")]
|
|
|
public class RemoveUnitAction : AbstractAction
|