public void UseMasochistShield() { MasochistShield newShield = Instantiate(masochistShieldPrefab, transform.position, new Quaternion()) as MasochistShield; newShield.transform.parent = gameObject.transform; newShield.thisPlayer = this.player; newShield.owningPlayer = playerEnum; newShield.ActivateShield(); }
public void InstantiateShield() { if (shooting.curAmmo != 0 && !shieldUp) { MasochistShield newShield = Instantiate(shield, transform.position, new Quaternion()) as MasochistShield; newShield.transform.parent = gameObject.transform; newShield.thisPlayer = player; newShield.owningPlayer = playerEnum; newShield.ActivateShield(); shooting.ExpendAttackSlot(); } else { SoundManager.instance.Play("OutOfAmmo", 1); } }