Пример #1
0
 void inp_MouseMoved(Broadphases.Input.MouseData data)
 {
     if( !transform )
         m_Position.Value = new Vector3(data.mouseX, data.mouseY, 0.0f);
     if (transform)
         m_Position.Value = Camera.ScreenToWorld(new Vector2(data.mouseX, data.mouseY) , 0.0f);
 }
Пример #2
0
 void Follower_KeyPressed(Broadphases.Input.KeyData key)
 {
     if (key.keyCode == Microsoft.Xna.Framework.Input.Keys.S)
         active = !active;
 }
Пример #3
0
 void ButtonReleased(Broadphases.Input.MouseData data)
 {
     Box = Rectangle.Empty;
     Selecting = false;
 }
Пример #4
0
 void ButtonHeld(Broadphases.Input.MouseData data)
 {
     if( data.mouseButtons[0] )
     {
         Vector3 pos = new Vector3(data.mouseX, data.mouseY, 0.0f);
         m_CurrentPosition = pos;
         m_Box.Width = (int)pos.X - m_Box.X;
         m_Box.Height = (int)pos.Y - m_Box.Y;
         Selecting = true;
     }
 }
Пример #5
0
 void ButtonClicked(Broadphases.Input.MouseData data)
 {
     if (data.mouseButtons[0])
     {
         m_Box = new Rectangle((int)data.mouseX, (int)data.mouseY, 0, 0);
         m_CurrentPosition = new Vector3(data.mouseX, data.mouseY, 0.0f);
     }
 }