Пример #1
0
 public void PickUp(PlannerPlayer playerObj)
 {
     if (itemAt != null)
     {
         itemAt = null;
         playerObj.playerInventory.Add(this);
         onInventory = playerObj;
     }
 }
Пример #2
0
 public void Drop(PlannerPlayer playerObj, PlannerPoi poiObj)
 {
     if (itemAt == null)
     {
         itemAt      = poiObj;
         onInventory = null;
         for (int i = 0; i < playerObj.playerInventory.Count; i++)
         {
             if (this.name.Equals(playerObj.playerInventory [i].name))
             {
                 playerObj.playerInventory.RemoveAt(i);
                 break;
             }
         }
     }
 }
Пример #3
0
 public void Use()
 {
     onInventory = null;
 }