protected override void Run(EventType.AOIRemoveUnit args)
        {
            AOIUnitComponent a = args.Receive;
            AOIUnitComponent b = args.Unit;

            if (a.GetParent <Unit>().Type != UnitType.Player)
            {
                return;
            }

            UnitHelper.NoticeUnitRemove(a.GetParent <Unit>(), b.GetParent <Unit>());
        }
Example #2
0
        protected override void Run(EventType.AOIRegisterUnit args)
        {
            AOIUnitComponent a = args.Receive;
            AOIUnitComponent b = args.Unit;

            if (a == b)
            {
                return;
            }
            Unit ua = a.GetParent <Unit>();

            if (ua.Type != UnitType.Player)
            {
                return;
            }

            Unit ub = b.GetParent <Unit>();

            UnitHelper.NoticeUnitAdd(ua, ub);
        }