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
示例#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;
            }
        }
示例#2
0
 private static void ReleaseHandler(MouseEventArgs Args)
 {
 }
示例#3
0
 private static void PressHandler(MouseEventArgs Args)
 {
 }
示例#4
0
 private static void MoveHandler(MouseEventArgs Args)
 {
 }
示例#5
0
 private static void DownHandler(MouseEventArgs Args)
 {
 }
示例#6
0
 private static void ClickHandler(MouseEventArgs Args)
 {
 }
示例#7
0
 static void releaseHandler( MouseEventArgs Args )
 {
 }
示例#8
0
 static void pressHandler( MouseEventArgs Args )
 {
 }
示例#9
0
 static void moveHandler( MouseEventArgs Args )
 {
 }
示例#10
0
 static void downHandler( MouseEventArgs Args )
 {
 }
示例#11
0
 static void clickHandler( MouseEventArgs Args )
 {
 }
示例#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();
        }