Beispiel #1
0
  /** shoots the AWP */
  public void shootAWP(int x, int y) {
    if (numBullets > 0) {
      numBullets--;
      AWP.start();
      shotTime = System.currentTimeMillis();
      ammo.setText("" + numBullets);

      double awpx = pos.x + width / 2;
      double awpy = pos.y + height / 2;

      double mousex = x + this.pos.x - (Wuigi.screenWidth / 2.0 + xOffset());
      double mousey = Wuigi.screenHeight + pos.y + 32 - (ScreenManager.mouse.y + yOffset());

      addSpawn(new AWPBullet(awpx, awpy, mousex, mousey));
    }
  }
Beispiel #2
0
 /** gives the player an Arctic Warfare Magnum Sniper Rifle. Oh dear. */
 public void giveAWP() {
   numBullets += 2;
   ammo.setText("" + numBullets);
 }