Exemplo n.º 1
0
        public void Update()
        {
            if (!Comunication.IsFacingRight && !was_facing_right)
            {
                was_facing_right = true;
                Animate.Image.RotateFlip(RotateFlipType.RotateNoneFlipX);
            }

            if (Comunication.IsFacingRight && was_facing_right)
            {
                was_facing_right = false;
                Animate.Image.RotateFlip(RotateFlipType.RotateNoneFlipX);
            }

            if (Comunication.WasLaunched)
            {
                Animate.Image = _launchImg;
                _gonnaThrowSound.Play();
                Comunication.StopAnimating(2000);
            }
            else
            {
                if (!Comunication.IsInside)
                {
                    Animate.Image = _defaultImg;
                }
                else
                {
                    Animate.Image = _touchImg;
                }
            }
        }
Exemplo n.º 2
0
        private void GotoMouse()
        {
            if (Comun.Location.X == path.Steps[count].X && Comun.Location.Y == path.Steps[count].Y)
            {
                Comunication.StopMovement(1500);
            }

            // make a new step list if gone through all steps
            Destination = new Point(Cursor.Position.X - (Comun.Width / 3), Cursor.Position.Y - (Comun.Height / 2));;
            path        = new Path(Comun.Location, Destination, Height, Width);
            path.Generate(Vel * 2);
        }
Exemplo n.º 3
0
        public void Update()
        {
            if (!Comunication.WasLaunched && Comunication.IsAfterMouse && Comunication.IsInside)
            {
                // get a new position to throw the mouse at, and then trow it there
                Point NewRandomMousePos = new Point(random.Next(0, 1366), random.Next(0, 768));
                setCursosPos(NewRandomMousePos.X, NewRandomMousePos.Y);

                // give the mouse some time to recover
                Comunication.stopDetection(1500);
            }
        }