Exemplo n.º 1
0
 public void Activate(MasterInventory_Class inventory)
 {
     if (inventory.EquippedRangedWeaponScipt != null && inventory.readyToEquip == true)
     {
         SwapWeapon(inventory);
     }
 }
    } //////

    //Pick up this weapon
    public override void Activate(MasterInventory_Class inventory)
    {
        if (inventory.readyToEquip == true)
        {
            MoveToPosition(inventory.RangedWeaponPosition);
            inventory.EquipNewRangedWeapon(this);
            TurnOffInteraction();
        }
    }
Exemplo n.º 3
0
 public override void Activate(MasterInventory_Class inventory)
 {
     if (waitingToDie == false && inventory.readyToEquip == true)
     {
         TurnOffInteraction();
         inventory.EquipNewThrowable(this);
         MoveToPosition(inventory.ThrowablePosition);
     }
 }
Exemplo n.º 4
0
    public void SwapWeapon(MasterInventory_Class inventory)
    {
        RangedWeapon_Class WeaponToGive = EquippedRangedWeapon;
        RangedWeapon_Class WeaponToTake = inventory.EquippedRangedWeaponScipt;

        int x = 0;

        foreach (RangedWeapon_Class w in inventory.RangedWeapons)
        {
            if (w != null)
            {
                if (WeaponToGive.weaponName == w.weaponName)
                {
                    x++;
                }
            }
        }

        if (x > 0)
        {
            Debug.Log("hit case 1");
            //Do nothing
            //Make this destroy the weapon we dont want anymore later.
        }

        else
        {
            Debug.Log("hit case 2");


            //give old weapon to the player
            //move to position
            //equip new weapon
            //move to posiiton
            inventory.DropRangedWeapon(WeaponToTake);

            WeaponToGive.MoveToPosition(inventory.RangedWeaponPosition);
            inventory.EquipNewRangedWeapon(WeaponToGive);

            WeaponToTake.gameObject.SetActive(true);

            WeaponToTake.MoveToPosition(GunPosition);
            Debug.Log("Moved Weapon to correct spot");

            EquippedRangedWeapon = WeaponToTake;
            Debug.Log("Replaced old weapon");

            EquippedRangedWeapon.TurnOffInteraction();
        }
    }
 public virtual void FacilityEffect(MasterInventory_Class inventory)
 {
 }
 public void Activate(MasterInventory_Class inventory)
 {
     FacilityEffect(inventory);
 }
    //Each weapon uses this to be picked up
    public virtual void Activate(MasterInventory_Class inventory)
    {

    }