X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fmagicblock.hpp;h=43b0a18a9304e0fc77d3c7fbc1aebd75587b7534;hb=79f870896e74b27bd093dca36b90e5ea3182ce92;hp=a0592b919262f33af39a34209cc6bb5e9bc4f3c3;hpb=ab9eab4c870195c2b60ce76b77044c35b31e8806;p=supertux.git diff --git a/src/object/magicblock.hpp b/src/object/magicblock.hpp index a0592b919..43b0a18a9 100644 --- a/src/object/magicblock.hpp +++ b/src/object/magicblock.hpp @@ -1,11 +1,12 @@ // $Id$ // // SuperTux - MagicBlock -// -// Magic Blocks are tile-like game objects that are sensitive to +// +// Magic Blocks are tile-like game objects that are sensitive to // lighting conditions. They are rendered in a color and // will only be solid as long as light of the same color shines -// on the block. +// on the block. The black block becomes solid, if any kind of +// light is above MIN_INTENSITY. // // Copyright (C) 2006 Wolfgang Becker // @@ -23,8 +24,8 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#ifndef SUPERTUX_TRAMPOLINE_H -#define SUPERTUX_TRAMPOLINE_H +#ifndef SUPERTUX_MAGICBLOCK_H +#define SUPERTUX_MAGICBLOCK_H #include "moving_sprite.hpp" #include "lisp/lisp.hpp" @@ -34,6 +35,7 @@ class MagicBlock: public MovingSprite public: MagicBlock(const lisp::Lisp& reader); + bool collides(GameObject& other, const CollisionHit& hit); HitResponse collision(GameObject& other, const CollisionHit& hit); void update(float elapsed_time); void draw(DrawingContext& context); @@ -43,9 +45,12 @@ private: float trigger_red; float trigger_green; float trigger_blue; + float solid_time; + float switch_delay; /**< seconds until switching solidity */ Color color; Color light; Vector center; + bool black; }; #endif