public override Activity Tick(Actor self) { if (plane.ForceLanding) { Cancel(self); return(NextActivity); } if (IsCanceled) { return(NextActivity); } if (remainingTicks > 0) { remainingTicks--; } else if (remainingTicks == 0) { return(NextActivity); } // We can't possibly turn this fast //我们不可能把这个速度变快 var desiredFacing = plane.Facing + 64; Fly.FlyToward(self, plane, desiredFacing, cruiseAltitude); return(this); }
public override Activity Tick(Actor self) { if (!target.IsValidFor(self)) { Cancel(self); } if (IsCanceled) { return(NextActivity); } var d = target.CenterPosition - self.CenterPosition; var move = plane.FlyStep(plane.Facing); if (d.HorizontalLengthSquared < move.HorizontalLengthSquared) { plane.SetPosition(self, target.CenterPosition); return(NextActivity); } Fly.FlyToward(self, plane, d.Yaw.Facing, new WDist(target.CenterPosition.Z)); return(this); }
public override Activity Tick(Actor self) { if (plane.ForceLanding) { Cancel(self); return(NextActivity); } if (IsCanceled || remainingTicks-- == 0) { return(NextActivity); } Fly.FlyToward(self, plane, plane.Facing, cruiseAltitude); return(this); }
public override Activity Tick(Actor self) { if (plane.ForceLanding) { Cancel(self); return(NextActivity); } if (IsCanceled || !self.World.Map.Contains(self.Location)) { return(NextActivity); } Fly.FlyToward(self, plane, plane.Facing, plane.Info.CruiseAltitude); return(this); }