public override void OnStart(GameObject obj, SNPCComponent ai) { index = 0; if (obj.TryGetComponent <AutopilotComponent>(out var ap)) { ap.GotoVec(Eval(0), Cruise != AiGotoKind.GotoNoCruise, MaxThrottle); } }
public override void Update(GameObject obj, SNPCComponent ai, double time) { if (obj.TryGetComponent <WeaponControlComponent>(out var weapons)) { weapons.AimPoint = Vector3.Transform(Vector3.Zero, target.WorldTransform); weapons.FireAll(); } }
public override void Update(GameObject obj, SNPCComponent ai, double time) { t += time; if (t >= Duration) { ai.SetState(Next); } }
public override void OnStart(GameObject obj, SNPCComponent ai) { if (obj.TryGetComponent <AutopilotComponent>(out var ap) && target.TryGetComponent <SDockableComponent>(out var dock)) { dock.StartDock(obj, 0); ap.StartDock(target); } }
public override void OnStart(GameObject obj, SNPCComponent ai) { if (obj.TryGetComponent <AutopilotComponent>(out var ap)) { ap.GotoVec(Target, Cruise != AiGotoKind.GotoNoCruise, MaxThrottle, Range); if (Cruise == AiGotoKind.GotoCruise) { obj.GetComponent <ShipPhysicsComponent>().BeginCruise(); } } }
public override void Update(GameObject obj, SNPCComponent ai, double time) { if (obj.TryGetComponent <AutopilotComponent>(out var ap)) { if (ap.CurrentBehaviour == AutopilotBehaviours.None) { ; } ai.SetState(Next); } else { ai.SetState(Next); } }
public override void Update(GameObject obj, SNPCComponent ai, double dt) { if (obj.TryGetComponent <AutopilotComponent>(out var ap)) { if (ap.CurrentBehaviour == AutopilotBehaviours.None) { if (index + 1 < 4) { index++; //ap.GotoVec(Points[index], Cruise, MaxThrottle, Range); ap.GotoVec(Eval(times[index]), Cruise != AiGotoKind.GotoNoCruise, MaxThrottle); } else { ai.SetState(Next); } } } else { ai.SetState(Next); } }
public override void Update(GameObject obj, SNPCComponent ai, double time) { }
public abstract void Update(GameObject obj, SNPCComponent ai, double dt);
public abstract void OnStart(GameObject obj, SNPCComponent ai);
public override void OnStart(GameObject obj, SNPCComponent ai) { }