A. 求一套完整網路游戲源碼,最好是RPG類的游戲,我是用來學習研究,要錢的免談
完整的怕不好搞哦。。。如果網頁類的也許可以很勉強的算RPG的開源游戲道是有一個。。。就不知道你要不要了
B. 誰知道哪有Visual C++角色扮演游戲程序設計的源碼呀
http://download.chinaitlab.com/program/files/14526.html
C. flex 游戲開發 求多人游戲源碼,我只有20分,實在不好意思
坐騎鹿的身上也攜帶著一個憂傷的故事,《天
驕--3》的世界中但能夠給駕馭它的英雄
D. 求一個FLASH游戲製作的全過程包括全部源代碼
對於大多數的Flash學習者來說,製作Flash游戲一直是一項很吸引人,也很有趣的技術,甚至許多閃客都以製作精彩的Flash游戲作為主要的目標。不過往往由於急於求成,製作資料不足,數據獲得不易,使許多朋友難以順利進行Flash游戲設計。即使自己下定決心,也是進展緩慢,乃至最終放棄。所有這一切都不是因為製作者的技術水平的問題,而是在於游戲製作前的前期設計與規劃沒有做好造成的,所以這里我們主要來談一下Flash游戲製作流程與規劃這個方面,希望能對大家的游戲製作有一定的啟發作用。
游戲的種類
凡是玩過PC游戲或者TV游戲的朋友一定非常清楚,游戲可以分成許多不同的種類,各個種類的游戲在製作過程中所需要的技術也都截然不同,所以在一開始構思游戲的時候,決定游戲的種類是最重要的一個工作,在Flash可實現的游戲范圍內,基本上可以將游戲分成以下幾種類型:
動作類游戲(Actions)
凡是在游戲的過程中必須依靠玩家的反應來控制游戲中角色的游戲都可以被稱做」動作類游戲」。在目前的flash游戲中,這種游戲是最常見的一種,也是最受大家歡迎的一種,至於游戲的操作方法,即可以使用滑鼠,也可以使用鍵盤。此類游戲的典型代表是著名的動作游戲」小小作品二號—過關斬將」和」碰碰拳打」。
益智類游戲(Puzzle)
此類游戲也是Flash比較擅長的游戲,相對於動作游戲的快節奏,益智類游戲的特點就是玩起來速度慢,比較幽雅,主要來培養玩家在某方面的智力和反應能力,此類游戲的代表非常多,比如牌類游戲,拼圖類游戲,棋類游戲等等,總而言之,那種玩起來主要靠玩家動腦筋的游戲都可以被稱為益智類游戲。
角色扮演類游戲(RPG)
所謂角色扮演類游戲就是由玩家扮演游戲中的主角,按照游戲中的劇情來進行游戲,游戲過程中會有一些解謎或者和敵人戰斗的情節,這類游戲在技術上不算難,但是因為游戲規模非常大,所以在製作上也會相當的復雜。
射擊類游戲(Shotting)
射擊類游戲在Flash游戲中佔有絕對的數量優勢,因為這類游戲的內部機制大家都比較了解,平時接觸的也較多,所以做起來可能稍微容易一點。
游戲的規劃與製作流程
在決定好將要製作的游戲的目標與類型後,接下來是不是可以立即開始製作游戲了呢?這里的回答是不可以!當然如果你一定要堅持立即開是製作,也不是不可以,只不過要事先提醒大家的是:如果你在製作游戲前還沒有一個完整的規劃,或者沒有一個嚴謹的製作流程,那麼必定將浪費你非常多的時間和精力,很有可能游戲還沒製作完成,你就已經感到筋疲力盡了。所以製作前認真制定一個製作游戲流程和規劃是十分必要的。
其實像Flash游戲這樣的製作規劃或者流程並沒有你想像中的那麼難,大致上只需要設想好游戲中會發生的所有情況,如果是RPG游戲需要設計好游戲中的所有可能情節,並針對這些情況安排好對應的處理方法,那麼製作游戲就變成了一件很有系統的工作了。
javascript :if(this.width>screen.width-333)this.width=screen.width-333" border=0>
接上
javascript :if(this.width>screen.width-333)this.width=screen.width-333" border=0>
上圖表現了游戲」擲摋子」的流程圖,只要對計算機有一定了解的朋友,對上面的流程圖一定不會感到很陌生的,如果是對程序設計有研究的朋友,對它就再也熟悉不過了,即使是在此之前沒有接觸過流程圖的朋友,只要稍微用心看一下,也不難理解其中包含的意思。
由上面的流程圖就可以清楚的了解需要製作的內容已及可能發生的情況。在游戲中,一開始玩家要確定所押的金額,接著會隨機出現玩家和電腦各自的點數,然後游戲對點數進行判斷,最後就可以判斷出誰勝誰負了。如果玩家勝利了,就會增加金額,相反則要扣除金額,接著顯示目前玩家的金額,再詢問玩家是否結束游戲,如果不結束,則再選擇要押的金額,進行下一輪游戲。
所以,如果有了比較完整的流程圖,肯定會使游戲的製作工作更加清晰和順利。
素材的收集和准備
游戲流程圖設計出來後,就需要著手收集和准備游戲中要用到的各種素材了,包括圖片,聲音等,俗話說,巧婦難為無米之炊,所以要完成一個比較成功的flash游戲,必須擁有足夠豐富的游戲內容和漂亮的游戲畫面,所以在進行下一步具體的製作工作前,需要好好准備游戲素材。
圖形圖象的准備
這里的圖形一方面指flash中應用很廣的矢量圖,另一方面也指一些外部的點陣圖文件,兩者可以進行互補,這是游戲中最基本的素材。雖然flash提供了豐富的繪圖和造型的工具,如貝塞耳曲線工具,可以在flash中完成絕大多數的圖形繪制工作,但是flash中只能繪制矢量圖形,如果需要用到一些點陣圖或者用flash很難繪制的圖形時,就需要使用外部的素材了。
取得這些素材一般有下面幾種方法:
1.自己動手製作:可以使用一些專業的圖形設計軟體來製作自己需要的素材,比如Photoshop,Painter,Coreldraw等都是很不錯的選擇,另外可能需要一些3D的造型,這時候象3D Studio Max,Poser,Moho和Bryce等都是很方便的工具,完全可以利用這些工具為flash服務。
2.多媒體光碟:現在的多媒體光碟種類越來越豐富,盤上的各類資源也愈來愈多,完全可以利用手上現有的各類光碟來尋找自己需要的素材,而且現在也有好多專門的素材光碟,素材數量非常豐富,完全可以滿足我們的製作需要。
3.網路資源:在互聯系網空前發展的今天,我們可以充分利用網路上大量的免費資源來尋找我們需要的素材,現在網上有非常豐富的各類素材,包括圖形,圖象和聲音等,我們完全可以足不出戶就得到我們需要的素材。
音樂及音效
音樂在flash游戲中是非常重要的一種元素,大家都希望自己的游戲能夠有聲有色,絢麗多彩,給游戲加入適當的音效,可以為整個游戲增色不少,前面的圖形圖象我們已經知道如何去獲取了,那麼如何找到我們需要的音效呢,下面就是一些常用的經驗和技巧:
1.網上搜集
網上有很多精彩的音效提供下載,但是這種方法的搜索麵積過大大,不好找重點,而且還要受網落速度的限制。不過這里可以給大家一個小建議:最好找那麼可以打包下載音效的網站,全部下載回來,然後自己整理和建立自己的本地音效庫,這樣在以後的製作中就可以很便捷的找到自己需要的音效。
2.音樂歌曲
就是從平常聽的音樂里找音效,如果要找快節奏的鼓點最好多搜集一些Disco的舞曲,風格最好是Techno,house。這些風格的鼓點很強烈,慢一點的可以選擇Hip-Hop的說唱音樂。好多韓國音樂和港台音樂的電子音效都很不錯。不能忽視的是一些動漫片的音樂,也有很多值得提取的部分。
3.故事片影碟。
這是最佳的音效來源,如今杜比音效已經很普及了,更為流行的是AC-3解碼的DVD音效,可以使用一些流行的播放軟體例如超級解霸來提取影片中的音效。
4.游戲
這是我發現的一個最為捷徑的音效來源,一般游戲安裝後都會有專門的目錄存放游戲中的音樂,比如游戲「生化危機」完全安裝後,會有一個Sound文件夾,打開看看吧,裡面存放了幾百種不同的音效,而且都是循環音效,是不是很方便啊。
製作與測試
當所有的素材都准備好後,就可以正式開始游戲的製作了,這下就需要靠你的flash技術了,當然,整個游戲的製作細節不是三言兩語能說清楚的,關鍵是靠平時學習和積累的經驗和技巧,把它們合理的運用到實際的製作工作中,這里僅提供幾條游戲製作的建議,相信可以幫助您在游戲製作的過程中更加順利:
1.分工合作:一個游戲的製作過程是非常繁瑣和復雜的,所以要做好一個游戲,必須要多人互相協調工作,每個人根據自己的特產來進行不同的任務,一般的經驗是美工負責游戲的整體風格和視覺效果,而程序員則進行游戲程序的設計,這樣一來,可以充分發揮各自的特點,可以保證游戲的製作質量和提高工作效率。
2.設計進度:既然游戲的流程圖都已經確定了,這樣就可以將所有要做的工作加以合理的分配,每天完成一定的任務,事先設計好進度表,然後按進度表去進行製作,才不會在最後關頭忙的不可開交,把大量工作堆在短時間內完成。
3.多多學習別人的作品:當然不是要抄襲他人的作品,而是在平時多注意別人的游戲製作方法,如果遇到好的作品,就要養成研究和分析的習慣,從這些觀摩的經驗中,大家可以學習到不少自己出錯的原因,甚至還有自己沒注意到的技術,也可以花些時間把它學會。
游戲製作完成後,就需要進行測試了,在測試方面可以利用flash的Control/ Test Movie命令來測試動畫的執行狀況了,進入測試模式後,還可以經過監視Objects和Variables的方式,找出程序中的問題。除此之外,為了避免測試時的盲點,一定要在多台計算機上進行測試,而且參加的人數最好多一點,這樣就有可能發現游戲中存在的問題,使游戲可以更加完善。
上面就是一般游戲的製作流程與規劃方法,如果在製作游戲的過程中可以遵守這樣的程序和步驟,那麼您的製作過程就可以相對順利一些,不過上面的步驟也不是一成不變的,可以根據實際情況來更改,只要不會造成游戲製作上的困難就可以
E. 求精品游戲源代碼
這位朋友,勸你好好學習學習DIRECTX的開發吧,那個學會了,你也就不會來這里跟我們要什麼DEMO學習了,到時候你絕對會來這里給那些需要這樣代碼的人發你自己的程序的,呵呵.
給你個方向吧 學習一下WINDOWS的畫圖API,然後再學習一下DIRECT的下的2D開發
游戲開發的開發是分工很明確的,策劃,美工,程序,你把程序這方面搞明白就行了.別的就先別想了
F. 殺人游戲的源代碼哪有呀
你說的是角色扮演類游戲的源代碼吧。
你可以用英文版搜索引擎找一下。
G. 求H5游戲源碼:用canvas實現人物打鬥(兩人對打)的動畫播放
用Easyjs 通過josn 配置文件讀取點陣圖位置 播放動畫
H. 彩虹島游戲的源代碼
這游戲按暫停後再按選擇鍵人物就無敵了
I. 游戲角色體型修改怎麼實現 源代碼
我暈,我想知道的是你會編程嗎??如果你想要改別人的代碼就首先你會編程,如果不會,就沒有戲了,就像給你一本世界上最好的書,但是你連字都不認識,你怎麼去看這本書?
J. 誰能給我一個手機游戲的源代碼啊
這個地址也有,不過直接給你吧,這樣比較好
先給你看看主要的類吧
package Game;
import DreamBubbleMidlet;
import java.io.IOException;
import java.util.Enumeration;
import java.util.Hashtable;
import javax.microedition.lci.Graphics;
import javax.microedition.lci.Image;
import javax.microedition.lci.game.GameCanvas;
import javax.microedition.lci.game.LayerManager;
import javax.microedition.lci.game.Sprite;
public class Game extends GameCanvas implements Runnable {
protected DreamBubbleMidlet dreamBubbleMidlet;
protected Graphics g;
protected Image loadingImage;
protected Image pauseImage;
protected Image cursorImage;
protected Image jackStateImage;
protected Image johnStateImage;
protected Image numberImage;
protected Sprite cursor;
protected Sprite number;
protected LayerManager cursorManager;
protected LayerManager numberManager;
protected Hashtable bombTable;
protected Map map;
protected LayerManager gameLayerManager;
protected Role player;
protected Sprite playerGhost;
protected int screenWidth;
protected int screenHeight;
protected int delay = 50;
protected int[][] bornPlace;
protected int chooseIndex;
protected int stageIndex = 1;
protected int gameClock;
protected int loadPercent;
protected boolean isPause;
protected boolean isEnd;
protected boolean isPlaying;
protected boolean isLoading;
protected Thread mainThread;
public Game(DreamBubbleMidlet dreamBubbleMidlet) {
super(false);
this.setFullScreenMode(true);
this.dreamBubbleMidlet = dreamBubbleMidlet;
this.screenWidth = this.getWidth();
this.screenHeight = this.getHeight();
try {
this.loadingImage = Image.createImage("/Game/Loading.png");
this.pauseImage = Image.createImage("/Game/Pause.png");
this.cursorImage = Image.createImage("/Game/Cursor.png");
this.jackStateImage = Image.createImage("/State/JackState.png");
this.johnStateImage = Image.createImage("/State/JohnState.png");
this.numberImage = Image.createImage("/State/Number.png");
} catch (IOException e) {
e.printStackTrace();
}
this.g = this.getGraphics();
}
public void loadStage(int stage) {
this.isEnd = false;
this.isPause = false;
this.isPlaying = false;
this.gameLayerManager = new LayerManager();
this.cursorManager = new LayerManager();
this.numberManager = new LayerManager();
this.bombTable = new Hashtable();
this.cursor = new Sprite(this.cursorImage, 32, 32);
this.number = new Sprite(this.numberImage, 12, 10);
this.loadPercent = 20;
sleep();
loadMap(stage);
this.loadPercent = 40;
sleep();
loadPlayer();
this.loadPercent = 60;
sleep();
this.gameLayerManager.append(map.getBombLayer());
this.gameLayerManager.append(map.getBuildLayer());
this.gameLayerManager.append(map.getToolLayer());
this.gameLayerManager.append(map.getFloorLayer());
this.gameLayerManager.setViewWindow(0, -5, screenWidth,
Global.MAP_HEIGHT + 5);
this.cursorManager.append(cursor);
this.numberManager.append(number);
this.loadPercent = 80;
sleep();
this.loadPercent = 100;
sleep();
isPlaying = true;
}
public void run() {
while (!isEnd) {
long beginTime = System.currentTimeMillis();
this.drawScreen();
long endTime = System.currentTimeMillis();
if (endTime - beginTime < this.delay) {
try {
Thread.sleep(this.delay - (endTime - beginTime));
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
public void loadMap(int stage) {
switch (stage) {
case 0:
this.map = new Map(Global.MAP_BLOCK);
this.bornPlace = Global.MAP_BLOCK_BORNPLACE;
break;
case 1:
this.map = new Map(Global.MAP_FACTORY);
this.bornPlace = Global.MAP_FACTORY_BORNPLACE;
break;
case 2:
this.map = new Map(Global.MAP_FOREST);
this.bornPlace = Global.MAP_FOREST_BORNPLACE;
break;
case 3:
this.map = new Map(Global.MAP_PIRATE);
this.bornPlace = Global.MAP_PIRATE_BORNPLACE;
break;
case 4:
this.map = new Map(Global.MAP_FAUBOURG);
this.bornPlace = Global.MAP_FAUBOURG_BORNPLACE;
break;
}
}
public void loadPlayer() {
this.player = SingleGameRole.createSingleGameRole(this, Global.JACK,
this.bornPlace[0][0], this.bornPlace[0][1]);
this.gameLayerManager.append(player);
try {
this.playerGhost = new Sprite(Image.createImage("/Character/Jack.png"),
this.player.width, this.player.height);
this.gameLayerManager.append(playerGhost);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public void playerUpdate() {
if(!this.player.isAlive)
this.playerGhost.setVisible(false);
this.playerGhost.setFrame(this.player.getFrame());
this.player.updateRole();
}
public void bombUpdate() {
Enumeration enu = this.bombTable.keys();
while (enu.hasMoreElements()) {
String key = (String) enu.nextElement();
Bomb bomb = (Bomb) (bombTable.get(key));
if (bomb.isvisable) {
bomb.update();
} else {
bombTable.remove(key);
bomb = null;
}
}
}
public void mapUpdate() {
this.map.update();
}
public void drawScreen() {
if (gameClock < 10000)
gameClock++;
else
gameClock = 0;
if (!this.isLoading) {
if (!isPause) {
this.operate();
this.bombUpdate();
this.playerUpdate();
this.mapUpdate();
g.setColor(0x000000);
g.fillRect(0, 0, getWidth(), getHeight());
this.drawState();
gameLayerManager.paint(g, 0, this.screenHeight
- Global.MAP_HEIGHT - 5);
} else {
this.drawPauseFrame();
}
} else {
this.drawLoadingFrame();
}
this.flushGraphics();
}
public void drawFailScreen() {
}
public void drawState() {
if (this.player.type == Global.JACK) {
g.drawImage(jackStateImage, 60, 5, Graphics.TOP | Graphics.LEFT);
}
if (this.player.type == Global.JOHN) {
g.drawImage(johnStateImage, 60, 5, Graphics.TOP | Graphics.LEFT);
}
this.number.setFrame(this.player.bombNums);
this.numberManager.paint(g, 101, 15);
this.number.setFrame(this.player.speed);
this.numberManager.paint(g, 133, 15);
this.number.setFrame(this.player.power);
this.numberManager.paint(g, 165, 15);
}
protected void drawPauseFrame() {
g.setColor(0x000000);
g.fillRect(0, 0, getWidth(), getHeight());
this.drawState();
if (gameClock % 5 == 0)
this.cursor.setFrame((this.cursor.getFrame() + 1) % 4);
this.gameLayerManager.paint(g, 0, this.screenHeight - Global.MAP_HEIGHT
- 5);
this.cursorManager.paint(g, screenWidth / 2 - pauseImage.getWidth() / 2
- 32, screenHeight / 2 - pauseImage.getHeight() / 2
+ this.chooseIndex * 33 + 24);
g.drawImage(pauseImage, screenWidth / 2, screenHeight / 2,
Graphics.HCENTER | Graphics.VCENTER);
}
protected void drawLoadingFrame() {
g.setColor(66, 70, 246);
g.fillRect(0, 0, screenWidth, screenHeight);
g.drawImage(loadingImage, screenWidth / 2, 2 * screenHeight / 5,
Graphics.HCENTER | Graphics.VCENTER);
g.setColor(0, 255, 0);
g.fillRect((screenWidth - 120) / 2, 2 * screenHeight / 3,
(this.loadPercent * 120) / 100, 10);
g.setColor(255, 0, 0);
g.drawRect((screenWidth - 120) / 2, 2 * screenHeight / 3, 120, 10);
}
public void showMe() {
new Loading(this.stageIndex);
if (this.mainThread == null) {
mainThread = new Thread(this);
mainThread.start();
}
this.dreamBubbleMidlet.show(this);
}
public void operate() {
int keyStates = getKeyStates();
this.playerGhost.setPosition(this.player.xCoodinate, this.player.yCoodinate);
if ((keyStates & DOWN_PRESSED) != 0) {
this.player.walk(Global.SOUTH);
} else {
if ((keyStates & UP_PRESSED) != 0) {
this.player.walk(Global.NORTH);
} else {
if ((keyStates & RIGHT_PRESSED) != 0) {
this.player.walk(Global.EAST);
} else {
if ((keyStates & LEFT_PRESSED) != 0) {
this.player.walk(Global.WEST);
}
}
}
}
}
protected void keyPressed(int key) {
if (!this.isPlaying)
return;
if (!this.isPause && key == -7) {// 右鍵
this.chooseIndex = 0;
this.pauseGame();
return;
}
if (key == 35) {// #鍵
this.nextStage();
return;
}
if (key == 42) {// *鍵
this.preStage();
return;
}
if (this.isPause) {
switch (key) {
case -1:
case -3:
if (this.chooseIndex == 0)
this.chooseIndex = 2;
else
this.chooseIndex = (this.chooseIndex - 1) % 3;
break;
case -2:
case -4:
this.chooseIndex = (this.chooseIndex + 1) % 3;
break;
case -5:// 確認鍵
case -6:// 左軟鍵
switch (chooseIndex) {
case 0:
this.continueGame();
break;
case 1:
this.restart();
break;
case 2:
this.endGame();
break;
}
break;
default:
break;
}
} else {
switch (key) {
case 53:
case -5:// 確認鍵
this.player.setBomb(this.player.getRow(), this.player.getCol());
break;
}
}
}
public void restart() {
new Loading(this.stageIndex);
}
public void continueGame() {
this.isPause = false;
this.player.play();
}
public void pauseGame() {
this.isPause = true;
this.player.stop();
}
public void endGame() {
this.isEnd = true;
this.mainThread = null;
System.gc();
try {
Thread.sleep(500);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
this.dreamBubbleMidlet.menu.showMe();
}
public void nextStage() {
if (this.stageIndex < 4) {
this.stageIndex++;
}
new Loading(this.stageIndex);
}
public void preStage() {
if (this.stageIndex > 0) {
this.stageIndex--;
}
new Loading(this.stageIndex);
}
class Loading implements Runnable {
private Thread innerThread;
private int stageIndex;
public Loading(int stageIndex) {
this.stageIndex = stageIndex;
innerThread = new Thread(this);
innerThread.start();
}
public void run() {
isLoading = true;
loadPercent = 0;
System.gc();
loadStage(stageIndex);
isLoading = false;
}
}
public void sleep() {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
這個是游戲主體類
下面是游戲的人物類
package Game;
import javax.microedition.lci.Image;
import javax.microedition.lci.game.Sprite;
public abstract class Role extends Sprite {
/**
* 人物的基本屬性
*/
protected int type;
protected int xCoodinate;
protected int yCoodinate;
protected int row;
protected int col;
protected int width;
protected int height;
protected int speed;
protected int status;
protected boolean isCanOperate = false;
protected boolean isAlive = true;
/**
* 人物放置炸彈的基本屬性
*/
protected int power;
protected int bombNums;
protected int characterClock = 0;
protected int deadTime = 0;
protected Game game;
protected Role(Image image, int width, int Height, Game game) {
super(image, width, Height);
this.game = game;
}
/**
* 人物拾起道具
* @param tool
*/
public abstract void pickupTool(int tool);
/**
* 碰撞檢測以及坐標的改變,如果對行走條件有特殊需求,既可以在這里寫自己的條件
* @param direction
*/
public abstract void collisionCheck(int direction);
public void updateRole() {
if (this.characterClock < 10000) {
this.characterClock++;
} else {
this.characterClock = 100;
}
int row = this.getRow();
int col = this.getCol();
if (this.isAlive) {
int tool = this.game.map.getToolLayer().getCell(col, row);
if (tool > 0) {
this.pickupTool(tool);
this.game.map.getToolLayer().setCell(col, row, 0);
}
if (this.game.map.hasFeature(row, col, Global.DEADLY)) {
this.isAlive = false;
return;
}
if (this.status == Global.BORN
&& this.characterClock > Global.BORN_TIME) {
this.status = Global.SOUTH;
this.setFrame(Global.SOUTH * 6);
this.isCanOperate = true;
}
if (this.status == Global.BORN) {
if (this.characterClock % 2 == 0)
this.setFrame(Global.BORN * 6 + (this.getFrame() - 1) % 4);
return;
}
} else {
this.isCanOperate = false;
if (this.deadTime <= 20) {
this.deadTime++;
} else {
this.deadTime = 100;
this.setVisible(false);
return;
}
if (this.characterClock % 2 == 0) {
if (this.getFrame() < Global.DEAD * 6) {
this.setFrame(Global.DEAD * 6);
} else {
if (this.getFrame() < 29) {
this.setFrame(this.getFrame() + 1);
} else {
if (this.characterClock % 4 == 0) {
this.setFrame(29);
this.setVisible(true);
} else {
this.setVisible(false);
}
}
}
}
}
}
public void walk(int direction) {
if (!isAlive)
return;
if (!isCanOperate)
return;
if(direction==9) return;
this.collisionCheck(direction);
if (this.characterClock % 2 == 0) {
if (this.status == direction) {
this.setFrame(this.status * 6 + (this.getFrame() + 1) % 6);
} else {
this.status = direction;
this.setFrame(this.status * 6);
}
}
this.setPosition(xCoodinate, yCoodinate);
}
public void stop() {
this.isCanOperate = false;
}
public void play() {
this.isCanOperate = true;
}
public abstract void setBomb(int row, int col);
public void increaseBomb() {
if (this.bombNums < Global.MAX_BOMB_NUMBER)
this.bombNums++;
}
public int getRow() {
return getRow(getBottomY(yCoodinate) - Global.MAP_CELL / 2);
}
public int getCol() {
return getCol(xCoodinate + Global.MAP_CELL / 2);
}
protected int getBottomY(int y) {
return y + this.height - 1;
}
protected int getRightX(int x) {
return x + Global.MAP_CELL - 1;
}
protected int getPreY(int y) {
return getBottomY(y) + 1 - Global.MAP_CELL;
}
protected int getRow(int x) {
return x / Global.MAP_CELL;
}
protected int getCol(int y) {
return y / Global.MAP_CELL;
}
}
我的QQ是609419340
看不明白的可以隨時來問我哦,還可以當時傳給你撒