private void Update() { if (m_iHealth == 0) { ToggleAlive(false); } if (IsAlive && !isInShop) { if (m_bPlayerOne) { // Calls a specific update function for the currently active gun if (m_gcGun && IsAlive && Input.GetAxis("P1 Triggers") < 0) { m_gcGun.ActiveGunUpdate(this); } } else { // Calls a specific update function for the currently active gun if (m_gcGun && IsAlive && Input.GetAxis("P2 Triggers") < 0) { m_gcGun.ActiveGunUpdate(this); } } } // Call an update function for each of the equiped guns if (m_gcGun) { m_gcGun.GunUpdate(); } }