示例#1
0
        private static IEnumerable <IWorldObject> ClientGetObjectsAtCurrentMousePosition()
        {
            var currentCharacter = Api.Client.Characters.CurrentPlayerCharacter;

            return(ClientComponentObjectInteractionHelper
                   // find by click area
                   .FindObjectsAtCurrentMousePosition(
                       currentCharacter,
                       CollisionGroups.ClickArea)
                   // find by default collider
                   .Concat(
                       ClientComponentObjectInteractionHelper
                       .FindObjectsAtCurrentMousePosition(
                           currentCharacter,
                           CollisionGroups.Default)));
        }
示例#2
0
        private static IEnumerable <IWorldObject> ClientGetObjectsAtCurrentMousePosition()
        {
            var currentCharacter = Api.Client.Characters.CurrentPlayerCharacter;

            return(ClientComponentObjectInteractionHelper
                   // find by click area
                   .FindObjectsAtCurrentMousePosition(
                       currentCharacter,
                       CollisionGroups.ClickArea)
                   // find by default collider
                   .Concat(
                       ClientComponentObjectInteractionHelper
                       .FindObjectsAtCurrentMousePosition(
                           currentCharacter,
                           CollisionGroups.Default))
                   //find object in the pointed tile
                   .Concat(
                       Api.Client.World.GetTile(Api.Client.Input.MouseWorldPosition.ToVector2Ushort())
                       .StaticObjects.OrderByDescending(o => o.ProtoStaticWorldObject.Kind)));
        }