Exemplo n.º 1
0
        internal void TriggerTouched(IObject entity, MRMTouchEventArgs args)
        {
            TouchEventArgs e = new TouchEventArgs();

            e.AvatarID       = args.Avatar.GlobalID;
            e.AvatarName     = args.Avatar.Name;
            e.AvatarPosition = args.Avatar.WorldPosition;
            e.TouchPosition  = args.TouchPosition;
            Touched(entity.GlobalID, e);
        }
Exemplo n.º 2
0
        private void TriggerTouched(IObject sender, MRMTouchEventArgs args)
        {
            if (_OnWorldTouch != null)
            {
                TouchEventArgs e = new TouchEventArgs();
                e.AvatarName     = args.Avatar.Name;
                e.AvatarID       = args.Avatar.GlobalID;
                e.AvatarPosition = args.Avatar.WorldPosition;
                e.TouchPosition  = args.TouchPosition;
                //e.TouchBiNormal = args.TouchBiNormal;
                //e.TouchMaterialIndex = args.TouchMaterialIndex;
                //e.TouchNormal = args.TouchNormal;
                //e.TouchST = args.TouchST;
                //e.TouchUV = args.TouchUV;
                //e.LinkNumber = args.LinkNumber;

                _OnWorldTouch(sender.GlobalID, e);
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// Handler for touch events from the world
 /// </summary>
 /// <param name="sender">The object which sent the touch event</param>
 /// <param name="args">Any arguments attached to the touch event</param>
 public void touchListener(IObject sender, TouchEventArgs args)
 {
     if (listening.Contains(sender.GlobalID)) {
         touchQ.qItem(new Pair<UUID, TouchEventArgs>(sender.GlobalID, args));
         DB.Print("Entry Point received touch event", Levels.SCRIPTS);
     }
 }
Exemplo n.º 4
0
        void EventManager_OnObjectGrab(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs)
        {
            if (_OnTouchActive && m_localID == localID)
            {
                TouchEventArgs e = new TouchEventArgs();
                e.Avatar = new SPAvatar(m_rootScene, remoteClient.AgentId, m_security);
                e.TouchBiNormal = surfaceArgs.Binormal;
                e.TouchMaterialIndex = surfaceArgs.FaceIndex;
                e.TouchNormal = surfaceArgs.Normal;
                e.TouchPosition = surfaceArgs.Position;
                e.TouchST = new Vector2(surfaceArgs.STCoord.X, surfaceArgs.STCoord.Y);
                e.TouchUV = new Vector2(surfaceArgs.UVCoord.X, surfaceArgs.UVCoord.Y);

                IObject sender = this;

                if (_OnTouch != null)
                    _OnTouch(sender, e);
            }
        }
Exemplo n.º 5
0
 private void TriggerTouch(IObject sender, TouchEventArgs args)
 {
     _obj = sender;
     OpenSim.Region.OptionalModules.Scripting.Minimodule.API.Sandboxed.Root.QueueEvent(() => _OnTouch(this, args));
 }
Exemplo n.º 6
0
        private void TriggerTouched(IObject sender, MRMTouchEventArgs args)
        {
            if (_OnWorldTouch != null) {
                TouchEventArgs e = new TouchEventArgs();
                e.AvatarName = args.Avatar.Name;
                e.AvatarID = args.Avatar.GlobalID;
                e.AvatarPosition = args.Avatar.WorldPosition;
                e.TouchPosition = args.TouchPosition;
                //e.TouchBiNormal = args.TouchBiNormal;
                //e.TouchMaterialIndex = args.TouchMaterialIndex;
                //e.TouchNormal = args.TouchNormal;
                //e.TouchST = args.TouchST;
                //e.TouchUV = args.TouchUV;
                //e.LinkNumber = args.LinkNumber;

                _OnWorldTouch(sender.GlobalID, e);
            }
        }
Exemplo n.º 7
0
 // This is our touch event handler
 void OnTouched(IObject sender, TouchEventArgs e)
 {
     Host.Object.Say("Touched.");
 }
Exemplo n.º 8
0
 private void Touched(UUID source, TouchEventArgs args)
 {
     if (!_permissions.Authorize(_factory[source], args.AvatarID)) {
         return;
     }
     _logger.Debug(Name + " touched.");
     foreach (var listener in _listeners)
         listener(source, args);
 }
Exemplo n.º 9
0
        private void RegisterPrim(IObject obj)
        {
            lock (this) {
                if (obj == null)
                    return;
                if (_tracked.Contains(obj.GlobalID))
                    return;
                else
                    _tracked.Add(obj.GlobalID);
            }
            try {
                obj.OnTouch += (source, args) => {
                    TouchEventArgs e = new TouchEventArgs();
                    e.AvatarID = args.Avatar.GlobalID;
                    e.AvatarName = args.Avatar.Name;
                    e.AvatarPosition = args.Avatar.WorldPosition;
                    e.TouchPosition = args.TouchPosition;
                    Touched(source.GlobalID, e);
                };

                _factory.RegisterLinkButton(obj, this);
            } catch (Exception e) {
                _factory.RegisterChatButton(obj.GlobalID, this);
                obj.Say(e.Message);
            }
        }
Exemplo n.º 10
0
 internal void TriggerTouched(IObject entity, MRMTouchEventArgs args)
 {
     TouchEventArgs e = new TouchEventArgs();
     e.AvatarID = args.Avatar.GlobalID;
     e.AvatarName = args.Avatar.Name;
     e.AvatarPosition = args.Avatar.WorldPosition;
     e.TouchPosition = args.TouchPosition;
     Touched(entity.GlobalID, e);
 }
Exemplo n.º 11
0
 internal void TriggerTouched(string text, UUID id)
 {
     string[] msg = text.Split(':');
     if (msg.Length == 5) {
         TouchEventArgs args = new TouchEventArgs();
         args.AvatarID = UUID.Parse(msg[1]);
         args.AvatarName = msg[2];
         args.AvatarPosition = Vector3.Parse(msg[3]);
         args.TouchPosition = Vector3.Parse(msg[4]);
         Touched(id, args);
     }
 }