You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
675 B
21 lines
675 B
using ET.EventType; |
|
|
|
namespace ET |
|
{ |
|
public class PeopleMoveEnd_StartHarvest : AEvent<EventType.PeopleMoveEnd> |
|
{ |
|
protected override void Run(PeopleMoveEnd args) |
|
{ |
|
var people = args.People; |
|
var unit = UnitHelper.GetMyUnitFromZoneScene(people.ZoneScene()); |
|
|
|
int behave = people.GetBehaveType(); |
|
var targetId = people.GetTargetId(); |
|
if (behave == ConstBehaveType.BEHAVE_PREPARE_HARVEST) |
|
{ |
|
var farmland = unit.GetGrandChild<Farmland>(targetId); |
|
FarmlandHelper.StartFarmlandHarvest(unit, people, farmland).Coroutine(); |
|
} |
|
} |
|
} |
|
} |