Example #1
0
        private void runNextPuppet()
        {
            if (runningPuppet >= 0)
            {
                puppets[runningPuppet].OnTurnComplete -= runNextPuppet;
            }
            runningPuppet++;
            runningPuppet %= puppets.Length;
            LocalPuppet localPuppet = puppets[runningPuppet];

            localPuppet.OnTurnComplete += runNextPuppet;
            localPuppet.Simulate();
        }
Example #2
0
 private void loadNextPuppet()
 {
     if (loadingPuppet >= 0)
     {
         puppets[loadingPuppet].OnLoaded -= loadNextPuppet;
     }
     loadingPuppet++;
     if (puppets.Length > loadingPuppet)
     {
         LocalPuppet localPuppet = puppets[loadingPuppet];
         localPuppet.OnLoaded += loadNextPuppet;
         localPuppet.Load();
     }
     else
     {
         startSimulation();
     }
 }