public void SeekForestItem(IForestItem item) { if (actionState != ActionState.eIdle) return; }
public void SeekForestItem(IForestItem item) { switch (item.ItemType) { case ForestItemEnum.eFruit: mTarget = ((ForestItem)item).transform; MoveToPoint(mTarget.position); actionState = State.eGatheringFruit; break; case ForestItemEnum.eSavage: mTarget = ((Critter)item).transform; actionState = State.eCapturingSavage; break; case ForestItemEnum.eAnimal: mTarget = ((Critter)item).transform; actionState = State.eTamingAnimal; break; } }
public void OrderCaptureItem(IForestItem item) { IPeon p = PopPeon(); if (p != null) p.SeekForestItem(item); else item.Unselect(); }
public void StoreForestItem(IForestItem item) { payLoadForestItem = item.ItemType; actionState = State.eStoringItem; switch (item.ItemType) { case ForestItemEnum.eFruit: MoveToPoint(Village.GetGlobalInstance().FruitsArea.AnyLocation); Payload.ShowPayload(VillageItemEnum.eFruit); item.ApplePicked(); break; case ForestItemEnum.eAnimal: MoveToPoint (Village.GetGlobalInstance ().AnimalsArea.AnyLocation); Payload.ShowPayload (VillageItemEnum.eAnimal); Forest.GetGlobalInstance ().OnAnimalTamed (); GameObject.Destroy ((item as Critter).gameObject); break; case ForestItemEnum.eSavage: MoveToPoint(Village.GetGlobalInstance().SavagesArea.AnyLocation); Payload.ShowPayload(VillageItemEnum.eSavage); Forest.GetGlobalInstance ().OnSavageCaptured (); GameObject.Destroy((item as Critter).gameObject); break; } mTarget = null; }