예제 #1
0
    public void EquipEquipment(GameItem itm, EquipmentType type)
    {
        switch (type)
        {
        case EquipmentType.LeftArm:
            _leftArm     = itm;
            _specials[0] = itm.special;

            break;

        case EquipmentType.RightArm:
            _rightArm    = itm;
            _specials[1] = itm.special;

            break;

        case EquipmentType.LeftLeg:
            _leftLeg     = itm;
            _specials[2] = itm.special;

            break;

        case EquipmentType.RightLeg:
            _rightLeg    = itm;
            _specials[3] = itm.special;

            break;
        }

        GlobalItens.RemoveFromInventory(itm);

        UpdateAttributesEquipment();
    }
예제 #2
0
 void OnMouseDown()
 {
     if (_invController.itemSelected != null)
     {
         GlobalItens.RemoveFromInventory(_invController.getItemSelected());
         _invController.UpdateItemList();
     }
 }
예제 #3
0
 public bool EquipItem(GameItem itm)
 {
     for (int i = 0; i < 4; i++)
     {
         if (_itens[i] == null)
         {
             _itens[i] = itm;
             GlobalItens.RemoveFromInventory(itm);
             return(true);
         }
     }
     return(false);
 }