Пример #1
0
    public void OnInsertItem(ItemSlot slot)
    {
        if (slot == this.m_WoodSlot)
        {
            this.m_BurningDuration -= slot.m_Item.m_Info.m_AddFirecamBurningTime;
            if (this.m_BurningDuration < 0f)
            {
                this.m_BurningDuration = 0f;
            }
            UnityEngine.Object.Destroy(slot.m_Item.gameObject);
            return;
        }
        bool flag = false;

        for (int i = 0; i < this.m_CookingSlots.Length; i++)
        {
            if (slot == this.m_CookingSlots[i])
            {
                flag = true;
                break;
            }
        }
        if (flag && slot.m_Item.m_Info.m_Type == ItemType.Bowl)
        {
            Collider component = slot.m_Item.gameObject.GetComponent <Collider>();
            component.isTrigger = true;
            slot.Deactivate();
            Bowl bowl = (Bowl)slot.m_Item;
            bowl.OnFirecampAdd(this);
        }
    }
Пример #2
0
 public void OnInsertItem(ItemSlot slot)
 {
     slot.m_Item.gameObject.GetComponent <Collider>().isTrigger = true;
     if (slot.m_Item.m_Info.m_Type == ItemType.Bowl)
     {
         Bowl bowl = (Bowl)slot.m_Item;
         bowl.OnFirecampAdd(this.m_Firecamp);
         this.m_Bowls.Add(bowl);
     }
     if (slot.m_Item.m_Info.m_ID == ItemID.Bamboo_Bowl)
     {
         for (int i = 0; i < this.m_Slots.Count; i++)
         {
             this.m_Slots[i].m_ActivityUpdate = false;
             this.m_Slots[i].Deactivate();
         }
     }
 }