Beispiel #1
0
 public void Update(Perso player, double angle, Controles controles)
 {
     if (player.direction == Direction.left)
     {
         position = new Vector2(player.position.X + player.image[0].Width - 18, player.position.Y + player.currentWeapon.image[(int)Direction.left].Height / 2);
     }
     else if (player.direction == Direction.right)
     {
         position = new Vector2(player.position.X + 18, player.position.Y + player.currentWeapon.image[(int)Direction.right].Height / 2);
     }
     this.angle = angle;
     //
     if (controles != null)
     {
         PosScope = new Vector2(controles.cursorPosition.X - scopeTexture.Width / 2 + 12, controles.cursorPosition.Y - scopeTexture.Height / 2 + 12);
     }
     if (hasSpecialAttack && controles.RightClick())
     {
         specialAttackEnabled = !specialAttackEnabled;
     }
 }