protected override void OnCantMove <T>(T component) { PlayerDungeon hitPlayerDungeon = component as PlayerDungeon; if (hitPlayerDungeon != null) { hitPlayerDungeon.LoseHealth(Strength); } SoundManager.Instance.RandomizeSfx(EnemyAttackSounds); _animator.SetTrigger("enemy1Attack"); }
/// <summary> /// Initialize dungeon and PlayerDungeon /// </summary> protected virtual void Start() { //this.Invoke(GenerateBoard, LevelStartDelay); GenerateBoard(); try { _player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerDungeon>(); _player.enabled = false; this.Invoke(EnableDungeonPlayer, LevelStartDelay); } catch { MyDungeonErrors.PlayerDungeonMustBeSpawnedInDungeon(); } }