언어/js WebGame RPG - PG_Villiage 조규현15 2015. 1. 8. 10:14 반응형 function LogoState(){ // this.img = new GraphicObject(resourcePreLoader.GetImage(“img/Logo.png”)); // type this.Type = 0;//idle villiage } LogoState.prototype.Init = function(){ //bgm //soundSystem.BackgroundSound(“sound/logo.wav”); }; LogoState.prototype.Render = function(){ var theCanvas = document.getElementById(“GameCanvas”); var Context = theCanvas.getContext(“2d”); if(this.Type == 0)//idle { //background Img //Character } else if(this.Type == 1)//weaphone Store {} else if(this.Type == 2)//amer Store {} else if(this.Type == 3)//INN {} else if(this.Type == 4)//dounsion { //D&F style } }; LogoState.prototype.Update = function(){ if(this.Type == 0)//idle { //Character key (l,r,t,b,enter,x) //same PlayGame } else if(this.Type == 1)//weaphone Store {} else if(this.Type == 2)//amer Store {} else if(this.Type == 3)//INN {} else if(this.Type == 4)//dounsion { //D&F style } }; 반응형