enum UpgradeKind {
UPGRADE_GROWUP,
+ UPGRADE_FIREFLOWER,
UPGRADE_ICEFLOWER,
UPGRADE_HERRING,
UPGRADE_1UP
void load_special_gfx();
void free_special_gfx();
-class Upgrade
+class Upgrade : public GameObject
{
public:
UpgradeKind kind;
Direction dir;
- base_type base;
- base_type old_base;
Physic physic;
void init(float x, float y, Direction dir, UpgradeKind kind);
void action(double frame_ratio);
void draw();
- void collision(void* p_c_object, int c_object);
+ void collision(void* p_c_object, int c_object, CollisionType type);
+ std::string type() { return "Upgrade"; };
+
+ ~Upgrade() {};
private:
/** removes the Upgrade from the global upgrade list. Note that after this
* anymore then
*/
void remove_me();
+
+ void bump(Player* player);
};
-class Bullet
+enum BulletsKind {
+ FIRE_BULLET,
+ ICE_BULLET
+};
+
+class Bullet : public GameObject
{
public:
int life_count;
base_type base;
base_type old_base;
+
+ int kind;
- void init(float x, float y, float xm, Direction dir);
+ void init(float x, float y, float xm, Direction dir, int kind_);
void action(double frame_ratio);
void draw();
void collision(int c_object);
+ std::string type() { return "Bullet"; };
private:
/** removes the Upgrade from the global upgrade list. Note that after this