c# - is using while for this ok? -


        while(player.closemenu(menutype))         {         } 

player.closemenu(menutype) close 1 menu of chosen type, or return false if there none left of type.

is ok use empty loop close menus of given type?

i expand on of these answers , create method called closeallmenus(menutype menutype). can put whatever kind of ugly implementation in there, , obvious doing when call it. current code doesn't explain happening unless know there can multiple menus of particular type open, , call close 1 of them.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -