public static void AddDropAtPosition(Position position, Drop drop) { lock (ConsoleAccessObject) { lock (DropAtPositionDictionaryAccess) { DropAtPosition.Add(position, drop); } DisplayModelAtPosition(position, position, drop.GetModel(), Direction.DOWN, false); } }
public void TrackDrop(Position position, Drop drop) { int appearTime = drop.GetAppearTime(); try { int pom = 1; while (appearTime > 0) { if (IsPaused) { GameData.PauseGameEvent.Reset(); GameData.PauseGameEvent.WaitOne(); } Thread.Sleep(1000); appearTime -= 1000; if (appearTime <= 4000) { if (pom == 1) { drop.GetModel().ModelColor = ConsoleColor.White; pom = 0; } else { drop.GetModel().ModelColor = drop.GetModel().ModelBaseColor; pom = 1; } GameData.DisplayModelAtPosition(position, position, drop.GetModel(), 0, false); } } } catch (ThreadInterruptedException) { } GameData.RemoveDropAtPosition(position); Pause.Detach(this); }
public HealthBonus(Drop drop) : base(drop) { }
public Bonus(Drop drop) { this.Drop = drop; }
public AmmoBonus(Drop drop) : base(drop) { }