Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 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;
     }
 }
Ejemplo n.º 3
0
 public virtual Status CheckStatus(Mission m)
 {
     return Status.Pending;
 }
Ejemplo n.º 4
0
 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;
 }
Ejemplo n.º 5
0
        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;
            }
        }
Ejemplo n.º 6
0
 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;
 }
Ejemplo n.º 7
0
        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;
        }
Ejemplo n.º 8
0
 public virtual Status CheckStatus(Mission m)
 {
     return(Status.Pending);
 }