private void stopThread() { manazerKola.stopThread(); thread.Join(); thread = null; manazerKola = null; }
private void startThread() { if (difficultyOfRound == Difficulty.None) { return; } if (manazerKola == null) { manazerKola = new RoundGovernor(true, ref arrayOfObjectInGame, g, this, graph, difficultyOfRound); } if (thread == null) { thread = new Thread(new ThreadStart(manazerKola.run)); } manazerKola.nastavFPS(actualFPS); // Start the thread thread.Start(); // Spin for a while waiting for the started thread to become // alive: while (!thread.IsAlive) { ; } }
private void startThread() { if (difficultyOfRound == Difficulty.None) { if (isH6ServerDead()) { System.Console.WriteLine("H6 server has been destroyed."); } return; } if (manazerKola == null) { manazerKola = new RoundGovernor(true, ref arrayOfObjectInGame, g, this, graph, difficultyOfRound); } if (thread == null) { thread = new Thread(new ThreadStart(manazerKola.run)); } manazerKola.nastavFPS(actualFPS); // Start the thread thread.Start(); // Spin for a while waiting for the started thread to become // alive: while (!thread.IsAlive) { ; } }
public World(List <ThinkingObject> objectInGame, int startingLifeOfH6Server) { manazerKola = new RoundGovernor(true, arrayOfObjectInGame); thread = new Thread(new ThreadStart(manazerKola.run)); arrayOfObjectInGame = objectInGame; setLifeOfH6ServerPc(startingLifeOfH6Server); }
private void stopThread() { manazerKola.stopThread(); RoundGovernor.running = false; thread.Join(); thread = null; manazerKola = null; }
private void startThread() { if (manazerKola == null) { manazerKola = new RoundGovernor(true, arrayOfObjectInGame, g); } if (thread == null) { thread = new Thread(new ThreadStart(manazerKola.run)); } // Start the thread thread.Start(); // Spin for a while waiting for the started thread to become // alive: while (!thread.IsAlive) { ; } }