/[enigma]/enigma/src/objects.cc
ViewVC logotype

Diff of /enigma/src/objects.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.26 by mhawlisch, Wed Mar 5 12:18:22 2003 UTC revision 1.27 by sfennig, Sat Mar 8 15:39:16 2003 UTC
# Line 925  namespace Line 925  namespace
925      public:      public:
926          Window() : Stone("st-window"), state(IDLE) {}          Window() : Stone("st-window"), state(IDLE) {}
927      private:      private:
928            bool on_laserhit(Direction dir) { return true; }    
929          enum State { IDLE, BREAK };          enum State { IDLE, BREAK };
930          State state;          State state;
931          void actor_hit(const StoneContact &sc)          void actor_hit(const StoneContact &sc)
# Line 1093  namespace Line 1094  namespace
1094          void actor_hit(const StoneContact &sc)          void actor_hit(const StoneContact &sc)
1095          {          {
1096              if (state == IDLE) {              if (state == IDLE) {
1097                  if (sc.actor->get_attrib("blackball")) {                  if (sc.actor->get_attrib("blackball"))
1098                      state = FRAGILE;}                      state = FRAGILE;
1099              }              }
1100              {              if( state == FRAGILE) {
1101                  if( state == FRAGILE)                  if (wielded_item_is(sc.actor, "it-hammer"))
1102                  {                      change_state(BREAK);
                     if (wielded_item_is(sc.actor, "it-hammer")) {  
                         play_sound("explosion1");  
                         state = BREAK;  
                         set_anim("st-break_acblack-anim");  
                     }  
                 }  
1103              }              }
1104          }          }
1105          void animcb() {          void animcb() {
1106              if (state == BREAK) {              if (state == BREAK)
1107                  KillStone(get_pos());                  KillStone(get_pos());
             }  
1108          }          }
1109          bool on_laserhit(Direction) {          bool on_laserhit(Direction) {
1110              change_state(BREAK);              change_state(BREAK);

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26