/// <summary> /// Вызывается при прохождении монстра к пункту назначения /// </summary> static public void OnMonsterPass(Monster monster) { Field.AddAnimation(new ColorFieldGameAnimation(Colors.Red, 2.0, 0.15, 0.0)); Life -= 1; if (Life == 0) { Status = GameStatus.PlayerLose; Timer.Pause(); if (GameOver != null) { GameOver(new LevelArg(CurrentLevel)); } } UpdateInformationControl(ControlType.LifeControl); if (MonsterPass != null) { MonsterPass(new MonsterArg(monster)); } if (MonsterGone != null) { MonsterGone(new MonsterArg(monster)); } }
/// <summary> /// Изменение количества денег /// </summary> static public void ChangeMoney(double delta) { Money += delta; if (delta > 0) { Field.AddAnimation(new ColorFieldGameAnimation(Colors.Green, 0.5, 0.15, 0.0)); } }