using System.Collections.Generic; using ET.EventType; namespace ET { [FriendClass(typeof(Construct))] public class PeopleMoveEnd_Construct : AEvent { protected override void Run(PeopleMoveEnd args) { People p = args.People; var unit = UnitHelper.GetMyUnitFromZoneScene(p.ZoneScene()); var cc = unit.GetComponent(); if (cc == null) { return; } foreach (var child in cc.Children) { Construct c = (Construct)child.Value; if (c.PreparePeopleIdList.Contains(p.Id)) { ConstructHelper.StartConstruct(unit, c.Id, p.Id).Coroutine(); return; } } } } }