Defines the event data for MouseDevice events.

Do not cache instances of this type outside their event handler. If necessary, you can clone an instance using the MouseEventArgs(MouseEventArgs) constructor.

Inheritance: System.EventArgs
Ejemplo n.º 1
0
        private void WindowOnMouseEvent(object sender, MouseEventArgs e)
        {
            if (_kuat.WindowOnMouseEvent(sender, e))
            {
                return;
            }

            if (!(e is MouseButtonEventArgs be))
            {
                return;
            }

            if (be.Mouse.IsButtonDown(MouseButton.Left))
            {
                Window.CursorVisible = false;

                var mouse = Mouse.GetState();
                _lastMousePos = new Point(mouse.X, mouse.Y);
            }
            else
            {
                Window.CursorVisible = true;
            }
        }
Ejemplo n.º 2
0
 private static void ReleaseHandler(MouseEventArgs Args)
 {
 }
Ejemplo n.º 3
0
 private static void PressHandler(MouseEventArgs Args)
 {
 }
Ejemplo n.º 4
0
 private static void MoveHandler(MouseEventArgs Args)
 {
 }
Ejemplo n.º 5
0
 private static void DownHandler(MouseEventArgs Args)
 {
 }
Ejemplo n.º 6
0
 private static void ClickHandler(MouseEventArgs Args)
 {
 }
Ejemplo n.º 7
0
 static void releaseHandler( MouseEventArgs Args )
 {
 }
Ejemplo n.º 8
0
 static void pressHandler( MouseEventArgs Args )
 {
 }
Ejemplo n.º 9
0
 static void moveHandler( MouseEventArgs Args )
 {
 }
Ejemplo n.º 10
0
 static void downHandler( MouseEventArgs Args )
 {
 }
Ejemplo n.º 11
0
 static void clickHandler( MouseEventArgs Args )
 {
 }
Ejemplo n.º 12
0
        private void ExplodeObject(object sender, MouseEventArgs evArgs)
        {
            if (!Parent.MouseClicked)
                return;

            Object pick = Picking.RayCastPick(Parent, flyingObjects.ToArray());
            if (pick == null)
                return;
            ((FlyingObject)pick).Kill();
            Game.ExplodeAt(pick.Location, .5f);

            //update score in Score TableP
            Game.Score[((FlyingObject)pick).ModelReference]++;

            GeneralAudio.PlaySound((1 + GeneralMath.RandomInt() % 8).ToString());
            //Console.WriteLine(flyingObjects.Count);
            flyingObjects.Remove((FlyingObject)pick);
            //Console.WriteLine(flyingObjects.Count);
            CurrentScore += ((FlyingObject)pick).ModelReference.score;
            scoreLabel.Text = CurrentScore.ToString() + "/" + TargetScore.ToString();

            if (CurrentScore >= TargetScore)
                Complete();
        }