diff webGL/src/mainfunc.js @ 5:a730b51d59eb draft

6th:use stat.js,divide render and update,change a way of updating game.
author e105711 <yomitan.ie.u-ryukyu.ac.jp>
date Fri, 04 May 2012 05:22:57 +0900
parents a22ff379000f
children 8c25fd3f9866
line wrap: on
line diff
--- a/webGL/src/mainfunc.js	Fri May 04 01:18:13 2012 +0900
+++ b/webGL/src/mainfunc.js	Fri May 04 05:22:57 2012 +0900
@@ -11,6 +11,19 @@
     }
 }
 
+function gameUpdate(MODE){
+    switch(MODE){
+    case TITLE:
+//	titleUpdate();
+	break;
+    case MAIN:
+//	mainUpdate();
+	break;
+    case PLAY:
+	playUpdate();
+    }    
+}
+
 function titleRender(ctx){
     reshape(ctx);
     ctx.clearColor(0,0,0.15,1);
@@ -43,4 +56,10 @@
     }
     PutSpriteF(ctx,100,70,1,imgs[6]);
     ctx.flush();
+}
+
+function playUpdate(){
+    for(i=0;i<notesArray.length;i++){
+	updNote(notesArray[i]);
+    }
 }
\ No newline at end of file