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
Post a Comment