Esempio n. 1
0
        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");
        }
Esempio n. 2
0
 /// <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();
     }
 }