Astroids.Classes.Player.Update C# (CSharp) Метод

Update() публичный Метод

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Результат void
        public void Update(GameTime gameTime)
        {
            //Player movement
            if (contHand.GetInput().Contains("Up"))
            {
                Move();
                playerTextureIdle = playerTextureMoving;
            }
            if (!contHand.GetInput().Contains("Up"))
            {
                SlowDown();
                playerTextureIdle = defaultTexture;
            }
            if (contHand.GetInput().Contains("Right"))
            {
                rotationAngle = rotationAngle + 0.1f;
                bulletDirection = new Vector2((float)Math.Cos(rotationAngle), (float)Math.Sin(rotationAngle));
            }
            if (contHand.GetInput().Contains("Left"))
            {
                rotationAngle = rotationAngle - 0.1f;
                bulletDirection = new Vector2((float)Math.Cos(rotationAngle), (float)Math.Sin(rotationAngle));
            }

            if (delay > 0)
            {
                delay--;
            }

            if (delay <= 0)
            {
                if (contHand.GetInput().Contains("Shoot"))
                {
                    weapList.Add(Shoot(1));
                }
            }

            hitBox = new Rectangle((int)(playerPos.X - (playerTextureIdle.Width / 2)), (int)(playerPos.Y - (playerTextureIdle.Height / 2)), playerTextureIdle.Width, playerTextureIdle.Height);
            contHand.SetWiimoteLeds(0, lives);
        }