Loops and Conditionals

From ETC Public Wiki
Jump to: navigation, search

Switch statement:

 var value : int;
 function Update(){
   switch(value){
     case 0:; // fall through
     case 1:; // fall through
     case 2:
       print("I can handle case: " + value);
       break;
     default:
       print("I can not handle case: " + value);
       break;
   }
 }