Exemplo n.º 1
0
        // Use this for initialization
        new void Start()
        {
            GetComponent <ParticleSystem>().Stop();             // Stop the animation so it doesn't play until the soldier collides with it
            m_GameManager      = GameObject.FindWithTag("GameController");
            m_ManagerMechanics = m_GameManager.GetComponent <Mechanics> ();
            m_Parent           = transform.parent.gameObject;

            m_ManagerMechanics.AddRespawnableObstacle(gameObject);              //Adds the parent object to the list of gameObjects to be reactivated on respawn
        }
Exemplo n.º 2
0
        // Use this for initialization
        new void Start()
        {
            m_Rigidbody        = GetComponent <Rigidbody> ();
            m_GameManager      = GameObject.FindWithTag("GameController");
            m_ManagerMechanics = m_GameManager.GetComponent <Mechanics> ();
            m_MakeDamage       = true;
            m_InitialPosition  = m_Rigidbody.transform.position;
            m_InitialRotation  = m_Rigidbody.transform.rotation;
            m_Audio            = GetComponent <AudioSource> ();
            m_Audio.clip       = m_RollSound;
            m_Audio.loop       = true;
            m_Audio.Play();

            m_ManagerMechanics.AddRespawnableObstacle(gameObject);              //Adds the object to the list of gameObjects to be reactivated on respawn
        }