|
@@ -648,6 +648,9 @@ namespace CommonAI.Zone.ZoneEditor.EventTrigger
|
|
|
[DescAttribute("位置")]
|
|
|
public PositionValue Pos = new PositionValue.VALUE();
|
|
|
|
|
|
+ [DescAttribute("改变朝向")]
|
|
|
+ public float Direction = 0f;
|
|
|
+
|
|
|
public override string ToString()
|
|
|
{
|
|
|
return string.Format("{0}传送到{1}", Unit, Pos);
|
|
@@ -658,7 +661,14 @@ namespace CommonAI.Zone.ZoneEditor.EventTrigger
|
|
|
Vector2 pos = Pos.GetValue(api, args);
|
|
|
if(unit != null && pos != null)
|
|
|
{
|
|
|
- unit.transport(pos.X, pos.Y);
|
|
|
+ if (Math.Abs(Direction) < 0.001f)
|
|
|
+ {
|
|
|
+ unit.transport(pos.X, pos.Y);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ unit.transport(pos.X, pos.Y, true, Direction);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|