Exemplo n.º 1
0
	public void SeekForestItem(IForestItem item) {
		if (actionState != ActionState.eIdle)
			return;
	}
Exemplo n.º 2
0
	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;
		}
	}
Exemplo n.º 3
0
	public void OrderCaptureItem(IForestItem item)
    {
        IPeon p = PopPeon();

        if (p != null)
            p.SeekForestItem(item);
        else
            item.Unselect();
    }
Exemplo n.º 4
0
	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;
	}