研究一下google pacman的代碼
insertCoin()投幣,開始初始化游戲
newGame(),初始化單人游戲。
g.newGame = function () {
g.playerCount = 1;//玩家數
g.createChrome();
g.createPlayfield();//創建地圖
g.createActors();//創建玩家
g.startGameplay()
};
g.keyPressed//鍵盤響應函數
posted on 2011-04-17 08:37
黃劍父 閱讀(1705)
評論(0) 編輯 收藏 引用 所屬分類:
html5