Beispiel #1
0
    void Awake()
    {
        m_impactPoint     = transform.position;
        m_currentHealth   = m_startingHealth;
        m_audioClipBucket = GetComponent <AudioClipBucket>();
        m_rigidBody       = GetComponent <Rigidbody>();

        if (m_aliveModel != null && m_deadModel != null)
        {
            m_aliveModel.SetActive(true);
            m_deadModel.SetActive(false);
        }

        if (m_fireSpawnPoints.Length == 0)
        {
            m_fireSpawnPoints    = new Transform[1];
            m_fireSpawnPoints[0] = transform;
        }
    }
Beispiel #2
0
 void Awake()
 {
     m_enemyHealthScript = GetComponentInParent <EnemyHealth>();
     m_audioClipBucket   = GetComponentInParent <AudioClipBucket>();
 }