コード例 #1
0
 public void OnEvent(MousePositionEvent ev)
 {
     if (UIEnabled)
     {
         Overlay.System.InjectMousePosition(ev.X, ev.Y, ev.Z);
     }
 }
コード例 #2
0
        public void Update()
        {
            Event e = null;

            while ((e = Input.Poll()) != null)
            {
                switch (e.Type)
                {
                case EventType.kKeyboard:
                {
                    KeyboardEvent ev = (KeyboardEvent)e;
                    OnEvent(ev);
                    break;
                }

                case EventType.kMouse:
                {
                    MouseEvent ev = (MouseEvent)e;
                    OnEvent(ev);
                    break;
                }

                case EventType.kPosition:
                {
                    MousePositionEvent ev = (MousePositionEvent)e;
                    OnEvent(ev);
                    break;
                }
                }
            }
        }
コード例 #3
0
        private void OnMousePosition(MousePositionEvent e)
        {
            Transform t = EntityWorld.GetComponent <Transform>(crosshairEntity);

            if (t != null)
            {
                t.Position = e.Position;
            }
        }
コード例 #4
0
        private void OnMousePosition(MousePositionEvent e)
        {
            mouseLocation = e.Position;
            Transform transform = EntityWorld.GetComponent <Transform>(player);

            if (transform != null)
            {
                Vector2 pPos = transform.Position;
                transform.Rotation = (float)Math.Atan2(mouseLocation.Y - pPos.Y, mouseLocation.X - pPos.X);
            }
        }
コード例 #5
0
ファイル: InputManager.cs プロジェクト: imGoose/SkyrimOnline
 public void OnEvent(MousePositionEvent ev)
 {
     if (UIEnabled)
         Overlay.System.InjectMousePosition(ev.X, ev.Y, ev.Z);
 }