void InitializeShieldColliders() { shieldScript = GetComponentInChildren <ShieldScript>(true); adaptiveShield = GetComponentInChildren <AdaptiveShieldScript>(true); shieldScript.gameObject.SetActive(true); adaptiveShield.gameObject.SetActive(true); adaptiveShield.shieldOn = false; shieldScript.TurnOffShield(); }
public void ToggleShield(bool shieldOn) { isShielding = shieldOn; if (isShielding) { shieldScript.TurnOnShield(); PlaySound(shieldOnSound); } else { shieldScript.TurnOffShield(); PlaySound(shieldOffSound); } adaptiveShield.shieldOn = isShielding; }