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.
26 lines
694 B
26 lines
694 B
3 years ago
|
|
||
|
namespace ET
|
||
|
{
|
||
|
public class PeopleMoveEnd_Gather : AEvent<EventType.PeopleMoveEnd>
|
||
|
{
|
||
|
protected override void Run(EventType.PeopleMoveEnd args)
|
||
|
{
|
||
|
var people = args.People;
|
||
|
var unit = UnitHelper.GetMyUnitFromZoneScene(people.ZoneScene());
|
||
|
|
||
|
var gatherComp = unit.GetComponent<GatherComponent>();
|
||
|
if (gatherComp == null)
|
||
|
{
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
var gather = gatherComp.GetGatherByPeopleId(people.Id);
|
||
|
if (gather == null)
|
||
|
{
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
GatherHelper.StartGather(unit, gather.Id, people.Id).Coroutine();
|
||
|
}
|
||
|
}
|
||
|
}
|