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
看不明白的可以随时来问我哦,还可以当时传给你撒