return position;
}
- // --- Scripting Interface ---
-
+ /**
+ * @name Scriptable Methods
+ * @{
+ */
void set_pos(float x, float y);
float get_pos_x() const;
float get_pos_y() const;
+ /**
+ * @}
+ */
protected:
virtual void hit(Player& player);
float speed_y; /**< scroll-speed in vertical direction */
std::auto_ptr<Surface> image_top; /**< image to draw above pos */
std::auto_ptr<Surface> image; /**< image to draw, anchored at pos */
- std::auto_ptr<Surface> image_bottom; /**< image to draw below pos+<screenheight> */
+ std::auto_ptr<Surface> image_bottom; /**< image to draw below pos+screenheight */
};
#endif /*SUPERTUX_BACKGROUND_H*/
virtual void expose(HSQUIRRELVM vm, SQInteger table_idx);
virtual void unexpose(HSQUIRRELVM vm, SQInteger table_idx);
+ /**
+ * @name Scriptable Methods
+ * @{
+ */
void puff_smoke(); /**< spawn a puff of smoke */
-
bool get_burning(); /**< returns true if candle is lighted */
void set_burning(bool burning); /**< true: light candle, false: extinguish candle */
+ /**
+ * @}
+ */
private:
bool burning; /**< true if candle is currently lighted */
void update(float elapsed_time);
void draw(DrawingContext& context);
+
+ /**
+ * @name Scriptable Methods
+ * @{
+ */
+
void fade_out(float fadetime);
void fade_in(float fadetime);
void set_black(bool enabled);
void sixteen_to_nine(float fadetime);
void four_to_three(float fadetime);
+ /**
+ * @}
+ */
+
private:
enum FadeType {
NO_FADE, FADE_IN, FADE_OUT
void update(float elapsed_time);
void draw(DrawingContext& context);
+ /**
+ * @name Scriptable Methods
+ * @{
+ */
+
/**
* Resumes the countdown
*/
*/
void set_time(float time_left);
+ /**
+ * @}
+ */
+
private:
std::auto_ptr<Surface> time_surface;
bool running;
return speed;
}
+ /**
+ * @name Scriptable Methods
+ * @{
+ */
+
/** Move platform until at given node, then stop */
void goto_node(int node_no);
/** Stop platform at next node */
void stop_moving();
+ /**
+ * @}
+ */
+
virtual void expose(HSQUIRRELVM vm, SQInteger table_idx);
virtual void unexpose(HSQUIRRELVM vm, SQInteger table_idx);
virtual void expose(HSQUIRRELVM vm, SQInteger table_idx);
virtual void unexpose(HSQUIRRELVM vm, SQInteger table_idx);
+ /**
+ * @name Scriptable Methods
+ * @{
+ */
+
/**
* Start playing thunder and lightning at configured interval
*/
*/
void electrify();
+ /**
+ * @}
+ */
+
private:
bool running; /**< whether we currently automatically trigger lightnings */
float interval; /**< time between two lightnings */
void draw(DrawingContext& context);
HitResponse collision(GameObject& other, const CollisionHit& hit);
+ /**
+ * @name Scriptable Methods
+ * @{
+ */
+
/**
* start blowing
*/
*/
void stop();
+ /**
+ * @}
+ */
+
virtual void expose(HSQUIRRELVM vm, SQInteger table_idx);
virtual void unexpose(HSQUIRRELVM vm, SQInteger table_idx);