目录结构调整
This commit is contained in:
36
codes/games/client/Projects/tgly/js/Game.js
Normal file
36
codes/games/client/Projects/tgly/js/Game.js
Normal file
@@ -0,0 +1,36 @@
|
||||
Game = function(){//构造方法
|
||||
this.score = 0;//当前游戏积分
|
||||
this.mode = -1;
|
||||
//this.highscore = 0;
|
||||
}
|
||||
if(typeof(Game.prototype.newgame) == "undefined"){
|
||||
Game.prototype.newgame = function(mode){//获得方格
|
||||
switch(mode){
|
||||
case 0:
|
||||
this.mode = mode;
|
||||
utlnewgame(mode);
|
||||
g_player.entergame(0);
|
||||
break;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Game.prototype.leavegame = function(mode){
|
||||
switch(mode){
|
||||
case 0:
|
||||
this.mode = mode;
|
||||
utlnewgame(mode);
|
||||
g_player.entergame(0);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user