Inheritance: UnityEngine.MonoBehaviour
Exemplo n.º 1
0
        private void SpawnAllEnemy()
        {
            int looplimit = m_Enemys.Length < m_gameLevel ? m_Enemys.Length : m_gameLevel;

            for (int i = 0; i < looplimit; i++)
            {
                CompleteProject.EnemyManager enemy = m_Enemys[i];
                enemy.StartSpawn();
            }
        }
Exemplo n.º 2
0
        void Awake()
        {
            // Setting up the references.
            anim = GetComponent <Animator>();
            enemyManager = GameObject.Find("/EnemyManager").GetComponent<EnemyManager>();
            hitParticles = GetComponentInChildren<ParticleSystem>();
            capsuleCollider = GetComponent<CapsuleCollider>();

            // Setting the current health when the enemy first spawns.
            currentHealth = startingHealth;
        }