Esempio n. 1
0
 internal static void Continue(SynchronizedActor actor, int actionCost)
 {
     if (Instance.m_started)
     {
         actor.ActionTime += (ulong)actionCost;
         actor.EndTurn();
         //Debug.Log(actor.name + " Action Complete, Next Action Time: "+actor.ActionTime);
         SynchronizedActor next = Instance.GetNextActorTurn();
         int count = 100;
         while (next == null && count > 0)
         {
             count--;
             Instance.ForwardTime();
             next = Instance.GetNextActorTurn();
         }
         if (count == 0)
         {
             Debug.LogError("Continue Loop Timeout!");
         }
         else
         {
             //Debug.Log("Giving Turn to " + next.name);
             next.GiveTurn();
         }
     }
 }
Esempio n. 2
0
    public static void Start()
    {
        Instance.m_started = true;
        Instance.init();
        SynchronizedActor a = Instance.GetNextActorTurn();

        if (a != null)
        {
            Debug.Log("Actor Found: " + a);
            a.GiveTurn();
        }
        else
        {
            Debug.Log("Null Actor!");
        }
    }