/[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.20 by sfennig, Thu Feb 20 06:56:21 2003 UTC revision 1.21 by sfennig, Sat Feb 22 23:38:56 2003 UTC
# Line 1043  namespace Line 1043  namespace
1043      private:      private:
1044          enum State { IDLE, FRAGILE, BREAK };          enum State { IDLE, FRAGILE, BREAK };
1045          State state;          State state;
1046            void change_state(State newstate) {
1047                if (newstate == BREAK) {
1048                    state = BREAK;
1049                    play_sound("explosion1");
1050                    set_anim("st-break_acwhite-anim");
1051                }
1052            }
1053            
1054          void actor_hit(const StoneContact &sc)          void actor_hit(const StoneContact &sc)
1055       {       {
1056            if (state == IDLE) {            if (state == IDLE) {
# Line 1064  namespace Line 1072  namespace
1072              if (state == BREAK) {              if (state == BREAK) {
1073              KillStone(get_pos());              KillStone(get_pos());
1074           }           }
1075         }
1076            bool on_laserhit(Direction) {
1077                change_state(BREAK);
1078                return false;
1079        }        }
1080     };     };
1081  }  }
# Line 1094  namespace Line 1106  namespace
1106      private:      private:
1107          enum State { IDLE, FRAGILE, BREAK };          enum State { IDLE, FRAGILE, BREAK };
1108          State state;          State state;
1109            void change_state(State newstate) {
1110                if (newstate == BREAK) {
1111                    state = BREAK;
1112                    play_sound("explosion1");
1113                    set_anim("st-break_acblack-anim");
1114                }
1115            }
1116            
1117          void actor_hit(const StoneContact &sc)          void actor_hit(const StoneContact &sc)
1118       {       {
1119            if (state == IDLE) {            if (state == IDLE) {
# Line 1115  namespace Line 1135  namespace
1135              if (state == BREAK) {              if (state == BREAK) {
1136              KillStone(get_pos());              KillStone(get_pos());
1137           }           }
1138         }
1139            bool on_laserhit(Direction) {
1140                change_state(BREAK);
1141                return false;
1142        }        }
1143     };     };
1144  }  }
1145    
   
1146  //----------------------------------------  //----------------------------------------
1147  // Brownie  // Brownie
1148  //----------------------------------------  //----------------------------------------

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

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