#include "texture.h"
#include "timer.h"
#include "scene.h"
+#include "physic.h"
+#include "collision.h"
enum ObjectType { OBJ_NONE, OBJ_BADGUY, OBJ_TRAMPOLINE };
: x(0), y(0), type(OBJ_NONE), type_specific() {};
};
-struct TrampolineData
-{
- int power;
-};
-
-
/* Bounciness of distros: */
#define NO_BOUNCE 0
#define BOUNCE 1
std::string type() { return "FloatingScore"; };
};
+
+/* Trampoline */
+struct TrampolineData
+{
+ float power;
+};
+
class Trampoline : public GameObject
{
public:
Trampoline(ObjectData<TrampolineData> data)
{
- base.x = data.x;
- base.y = data.y;
-
power = data.type_specific.power;
- }
+
+ init(data.x, data.y);
+ };
+
+ void collision(void *p_c_object, int c_object, CollisionType type);
+
+ Physic physic;
+ enum { M_NORMAL, M_HELD } mode;
private:
- int power;
+ float power;
+ unsigned int frame;
};
-void load_trampoline_gfx();
+
+void load_object_gfx();
#endif