Пример #1
0
        protected override void Run(EventType.UnitLeaveSightRange args)
        {
            AOIEntity a = args.A;
            AOIEntity b = args.B;

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

            UnitHelper.NoticeUnitRemove(a.GetParent <Unit>(), b.GetParent <Unit>());
        }
        protected override async ETTask Run(EventType.UnitLeaveSightRange args)
        {
            await ETTask.CompletedTask;
            AOIEntity a = args.A;
            AOIEntity b = args.B;

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

            UnitHelper.NoticeUnitRemove(a.GetParent <Unit>(), b.GetParent <Unit>());
        }
Пример #3
0
        protected override void Run(EventType.UnitEnterSightRange args)
        {
            AOIEntity a = args.A;
            AOIEntity b = args.B;

            if (a.Id == b.Id)
            {
                return;
            }

            Unit ua = a.GetParent <Unit>();

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

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

            UnitHelper.NoticeUnitAdd(ua, ub);
        }
Пример #4
0
        protected override async ETTask Run(Scene scene, EventType.UnitEnterSightRange args)
        {
            AOIEntity a = args.A;
            AOIEntity b = args.B;

            if (a.Id == b.Id)
            {
                return;
            }

            Unit ua = a.GetParent <Unit>();

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

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

            MessageHelper.NoticeUnitAdd(ua, ub);

            await ETTask.CompletedTask;
        }