Ejemplo n.º 1
0
    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();
    }
Ejemplo n.º 2
0
 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);
     }
 }