public void UseVampireShield() { VampireShield newShield = Instantiate(vampireShieldPrefab, transform.position, new Quaternion()) as VampireShield; newShield.transform.parent = gameObject.transform; newShield.thisPlayer = this.player; newShield.hitboxOffset = transform.Find("Hitbox").localPosition.y; newShield.owningPlayer = playerEnum; newShield.ActivateShield(); }
public void InstantiateShield() { if (shooting.curAmmo != 0 && !shieldUp) { VampireShield newShield = Instantiate(shield, transform.position, new Quaternion()) as VampireShield; newShield.transform.parent = gameObject.transform; newShield.thisPlayer = player; newShield.owningPlayer = playerEnum; newShield.ActivateShield(); shooting.ExpendAttackSlot(); } else { SoundManager.instance.Play("OutOfAmmo", 1); } }