public override Status CheckStatus(Mission m) { foreach (Actor a in Targets) { if (a.Kill) return Status.Failed; } foreach (SpaceShip a in Targets) { if (!a.ControlsJamed) return m.GameOver?Status.Failed:Status.Pending; } return Status.Done; }
public virtual void Tick(float dtime, Mission m) { Status newstatus = CheckStatus(m); if (newstatus != CurrentStatus && CheckDependencies()) { Cheetah.Console.WriteLine(ToString() + " status changed to " + newstatus.ToString() + "."); CurrentStatus = newstatus; } }
public virtual Status CheckStatus(Mission m) { return Status.Pending; }
public override Status CheckStatus(Mission m) { if (Root.Instance.IsAuthoritive) { foreach (Actor a in Targets) if (a.Kill) return Status.Failed; if (NoTreats) return Status.Done; return m.GameOver?Status.Done:Status.Pending; } else return CurrentStatus; }
public void Tick(float dtime, Mission m) { foreach (Objective o in PrimaryObjectives) { o.Tick(dtime,m); } /*foreach (Objective o in SecondaryObjectives) { o.Tick(dtime); }*/ Status newstatus = CheckStatus(m); if (newstatus != CurrentStatus) { Cheetah.Console.WriteLine(ToString() + " status changed to " + newstatus + "."); CurrentStatus = newstatus; } }
public Status CheckStatus(Mission m) { foreach (Objective o in PrimaryObjectives) { switch (o.CheckStatus(m)) { case Status.Failed: return Status.Failed; } } foreach (Objective o in PrimaryObjectives) { switch (o.CheckStatus(m)) { case Status.Pending: return Status.Pending; } } return Status.Done; }
public override Status CheckStatus(Mission m) { if (Root.Instance.IsAuthoritive) { foreach (Actor a in Targets) if (a.Kill) return Status.Failed; if (Targets[0].Distance(Targets[1]) < 1000) return Status.Done; return Status.Pending; } else return CurrentStatus; }
public virtual Status CheckStatus(Mission m) { return(Status.Pending); }