public static void WaterLoop() { while (Global.Run) { GameChecks.WaterFill(); } }
public static void GameLoop() { while (Global.Run) { while (Console.KeyAvailable) { GameChecks.UserInput(); GameChecks.Gravity(); Thread.Sleep(Global.FrameDelay); break; } GameChecks.Gravity(); } }
public static void TreePlacement() { int x = 0; while (x < Global.MapSize * Global.Width) { bool OnGround = false; int y = 0; x += Global.rnd.Next(5, 25); while (!OnGround) { try { if (GameChecks.IsSolid(Global.MapData[x, y + 1]) == true) { for (int i = 0; i < Global.rnd.Next(5, 7); i++) { if (y <= 2) { Bush(x, y); break; } Global.MapData[x, y] = 6; y -= 1; } OnGround = true; Bush(x, y); break; } else { y += 1; } } catch { break; } } } }