public override void                ProcessInput(Event ev)
        {
            base.ProcessInput(ev);

            // Process a list of things by def or thingcomp in a room
            if (!parentThing.Position.IsInRoom())
            {
                return;
            }

            // Left click (if assigned) all in room
            if (
                (ClickByDef != null) &&
                (ev.button == 0) &&
                (parentThing.IsSameThingDefInRoom())
                )
            {
                ClickByDef.Invoke(parentThing.ListSameThingDefInRoom());
            }
            else if (
                (ClickByThingComp != null) &&
                (ev.button == 1) &&
                (parentThing.IsSameThingCompInRoom(parentType))
                )
            {
                ClickByThingComp.Invoke(parentThing.ListSameThingCompInRoom(parentType));
            }
        }
Ejemplo n.º 2
0
        public override void                ProcessInput(Event ev)
        {
            base.ProcessInput(ev);

            // Process a list of touching things by def
            if (!parentThing.IsSameThingCompTouching(parentType))
            {
                return;
            }

            // Left click (if assigned) all in room
            if (
                (ClickLeft != null) &&
                (ev.button == 0) &&
                (parentThing.Position.IsInRoom())
                )
            {
                ClickLeft.Invoke(parentThing.ListSameThingCompTouching(parentType, true));
            }
            // right click (if assigned) all on map
            else if (
                (ClickRight != null) &&
                (ev.button == 1)
                )
            {
                ClickRight.Invoke(parentThing.ListSameThingCompTouching(parentType, false));
            }
        }
        public override void ProcessInput(Event ev)
        {
            base.ProcessInput(ev);

            // Process a list of touching things by def
            if (!parentThing.HasTouchingByLinker())
            {
                return;
            }

            // Left click (if assigned) all in room
            if ((_laction != null) &&
                (ev.button == 0) &&
                (parentThing.Position.IsInRoom()))
            {
                _laction.Invoke(parentThing.GetGroupOfTouchingByLinker(true));
            }
            // right click (if assigned) all on map
            else if ((_raction != null) &&
                     (ev.button == 1))
            {
                _raction.Invoke(parentThing.GetGroupOfTouchingByLinker(false));
            }
        }
Ejemplo n.º 4
0
        public override void ProcessInput(Event ev)
        {
            base.ProcessInput(ev);

            // Process a list of things by def or thingcomp in a room
            if (!parentThing.Position.IsInRoom())
            {
                return;
            }

            // Left click (if assigned) all in room
            if ((ByDefAction != null) &&
                (ev.button == 0) &&
                (parentThing.HasRoommateByDef()))
            {
                ByDefAction.Invoke(parentThing.GetGroupOfByDefInRoom());
            }
            else if ((ByThingCompAction != null) &&
                     (ev.button == 1) &&
                     (parentThing.HasRoommateByThingComp(parentType)))
            {
                ByThingCompAction.Invoke(parentThing.GetGroupOfByThingCompInRoom(parentType));
            }
        }