Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲
 Android教程網 >> Android系統教程 >> Android開發教程 >> 用HTML 5來開發一款android本地化App游戲-寶石碰碰

用HTML 5來開發一款android本地化App游戲-寶石碰碰

編輯:Android開發教程

首先來開發一個類似於對對碰的游戲,不過此游戲玩法為在下原創,如有雷同,純屬巧合,游戲界面 如下。

游戲操作:上下左右劃動 屏幕,來操作寶石向不同的方向移動。

游戲規則:當有三個一樣的寶石相鄰則消除,被消除過一 次的寶石會變成半透明,當所有寶石都被消除一次後,則進入下一關。

游戲測試連接:

http://lufylegend.com/demo/GemGem

制作開始

一,准備

首先,需要下載lufylegend.js引擎,下面是我在博客的 lufylegend-1.7.0發布帖

http://blog.csdn.net/lufy_legend/article/details/8719768

二,游戲開發

引擎lufylegend1.7.0中擴展了LLoadManage靜態類,可以讀取圖片,js文件以 及文本文件,本次游戲開發就來體驗一下這個新功能,首先看下面數組

代碼清單1

var 

loadData = [  
{path:"../jquery.js",type:"js"},  
{path:"./js/share.js",type:"js"},  
{path:"./js/Social.js",type:"js"},  
{path:"./js/GameRanking.js",type:"js"},  
{path:"./js/GameLogo.js",type:"js"},  
{path:"./js/GameClear.js",type:"js"},  
{path:"./js/Gem.js",type:"js"},  
{path:"./js/Stage.js",type:"js"},  
{path:"./js/Clock.js",type:"js"},  
{path:"./js/Point.js",type:"js"},  
{path:"./js/GetPoint.js",type:"js"},  
{path:"./js/Bullet.js",type:"js"},  
{path:"./js/Event.js",type:"js"},  
{path:"./js/function.js",type:"js"},  
{path:"./js/GameBody.js",type:"js"},  
{name:"num.+",path:"./images/plus.png"},  
{name:"num.0",path:"./images/0.png"},  
{name:"num.1",path:"./images/1.png"},  
{name:"num.2",path:"./images/2.png"},  
{name:"num.3",path:"./images/3.png"},  
{name:"num.4",path:"./images/4.png"},  
{name:"num.5",path:"./images/5.png"},  
{name:"num.6",path:"./images/6.png"},  
{name:"num.7",path:"./images/7.png"},  
{name:"num.8",path:"./images/8.png"},  
{name:"num.9",path:"./images/9.png"},  
{name:"back",path:"./images/back.png"},  
{name:"line",path:"./images/line.png"},  
{name:"clear",path:"./images/clear.png"},  
{name:"gem01",path:"./images/gem01.png"},  
{name:"gem02",path:"./images/gem02.png"},  
{name:"gem03",path:"./images/gem03.png"},  
{name:"gem04",path:"./images/gem04.png"},  
{name:"gem05",path:"./images/gem05.png"},  
{name:"gem06",path:"./images/gem06.png"},  
{name:"gem07",path:"./images/gem07.png"},  
{name:"gem08",path:"./images/gem08.png"},  
{name:"gem09",path:"./images/gem09.png"},  
{name:"ico_sina",path:"./images/ico_sina.gif"},  
{name:"ico_qq",path:"./images/ico_qq.gif"},  
{name:"ico_facebook",path:"./images/ico_facebook.png"},  
{name:"ico_twitter",path:"./images/ico_twitter.png"}  
];

  1. 上一頁:
  2. 下一頁:
熱門文章
閱讀排行版
Copyright © Android教程網 All Rights Reserved