overwrite switch condition to something else -



overwrite switch condition to something else -

im making game , im trying create area area impassible if dont utilize item (key guess). want rewrite switch condition

movefunction () { switch(action) case "east": if (maplocation == 7) { gamemsg = "you cannot pass"; } } useitem() { switch(item) { case "key": if (maplocation == 7) { gamemsg += may pass! //what can write here create area passible? had was: /* switch(action) { case "east": maplocation += 1; break; } */ } } }

yea how far got cant manipulate switch(action) insdie useitem function wont work.

switch-statement overwrite

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -