public void PickUp(PlannerPlayer playerObj) { if (itemAt != null) { itemAt = null; playerObj.playerInventory.Add(this); onInventory = playerObj; } }
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; } } } }
public void Use() { onInventory = null; }