//
// bullet.h
//
// standard bullet
//
//
// Author: Tomi Belan <tomi.belan@gmail.com>, (C) 2006
//
// Copyright: See COPYING file that comes with this distribution
//
//

#ifndef _bullet_h_
#define _bullet_h_

#include "gamehandler.h"
#include "gameobject.h"

class PlayerShip;

class Bullet : public GameObject {
private:
  GameHandler *handler;
  int playerId;
  int type;
  
public:
  SDL_Rect size;
  SDL_Rect pos;
  SDL_Rect velocity; // x,y vector; bullet adds it to its position each frame
  int speed; // length of the 'velocity' vector
  bool visible;
  
  Bullet(GameHandler *, int playerId);
  ~Bullet();
  void shipsWereInitialized();
  
  void update(SDL_Surface *where);
  void show(SDL_Rect npos, SDL_Rect nspeed);
  
  PlayerShip *myPlayerShip, *otherPlayerShip;
};

#endif

