Running Hero.
Running Hero開(kāi)發(fā)流程
?
一、需求分析
??? Running Hero是在接到大作業(yè)以前就已經(jīng)有的想法,一直沒(méi)有好的契機(jī)好好策劃實(shí)現(xiàn),正巧通過(guò)此次作業(yè)的機(jī)會(huì),將它實(shí)現(xiàn)出來(lái)了。
????? Running Hero 的初步定義是一款結(jié)合了傳統(tǒng)的橫版闖關(guān)以及當(dāng)下最流行的酷跑模式的新型橫版手游,大體上分成兩個(gè)模塊,單機(jī)闖關(guān)以及網(wǎng)絡(luò)聯(lián)機(jī)對(duì)戰(zhàn),由于技術(shù)不太成熟以及時(shí)間原因,暫時(shí)只開(kāi)發(fā)了單機(jī)闖關(guān)板塊。
????? Running Hero 整體風(fēng)格設(shè)計(jì)為卡通類(lèi)型的,素材(能力有限,非原創(chuàng))出自66rpg素材網(wǎng),游戲流程設(shè)計(jì)為:
????? 通過(guò)避開(kāi)關(guān)卡中的各種陷阱,收集主角升級(jí)所需的物品,提升等級(jí)來(lái)提升主角的各方面的能力值(攻擊力,防御力,生命值,力量等)來(lái)讓你的主角跑得更遠(yuǎn);通過(guò)擊敗關(guān)卡中的小型怪物獲取一些裝備,提升主角能力值;通過(guò)擊敗一定距離之后的Boss解鎖下一個(gè)場(chǎng)景,獲得更多的位置元素以及更豐富的游戲玩法,提升游戲的可玩性,用當(dāng)下比較流行的游戲次數(shù)限制(時(shí)間性恢復(fù))延長(zhǎng)游戲的壽命。
????? 游戲主要有開(kāi)始界面,游戲界面,暫停界面,菜單界面,裝備及屬性界面。
????? 有較為豐富的游戲元素和玩法,比較完善的游戲場(chǎng)景,動(dòng)作效果,音效,bgm等傳統(tǒng)游戲所具有的基本功能。
????? Running Hero 主要設(shè)定有2個(gè)角色(一前一后),玩家可自由設(shè)置主角的能力值,較為推薦的方式為前面一個(gè)厚血主要保護(hù)后面一個(gè)高攻角色的輸出環(huán)境提升dps。
關(guān)卡設(shè)定有陷阱(擊退角色并且扣除大量血量,無(wú)視防御值);
?
小型怪物(根據(jù)對(duì)比它和主角的能力值,計(jì)算擊退距離,扣除雙方血量,完成擊殺隨機(jī)獲得物品);
Boss (有較為強(qiáng)力的能力值,初期玩家要多次嘗試方可擊敗,擊殺獲得大量‘寶物’,解鎖場(chǎng)景獲得下一關(guān)卡的權(quán)限)。
????? ?裝備:靜態(tài)屬性(增加角色能力值),特效:特殊能力(暫不考慮);
?
二、概要設(shè)計(jì)
????? 1.游戲流程設(shè)計(jì)(流程圖)
2.游戲用例分析(用例圖)
3.游戲類(lèi)圖設(shè)計(jì)
?
三,詳細(xì)設(shè)計(jì)及編碼
?游戲核心部分代碼,一些關(guān)聯(lián)包沒(méi)上傳,等正式版出來(lái)了貼游戲apk以及全部源碼
1 package com.me.mygdxgame; 2 3 import com.badlogic.gdx.maps.tiled.TiledMap; 4 5 public class Collision { 6 public static int[][] barriers_1; 7 public static int[][] barriers_2; 8 public static TiledMap map; 9 public static int MAP_CELL_HEIGHT = 32; 10 public static int MAP_CELL_WIDTH = 32; 11 12 static { 13 map = GameScreen.map; 14 barriers_1 = GameScreen.barriers_1; 15 barriers_2 = GameScreen.barriers_2; 16 } 17 18 public static boolean onFloor(float x, float y) { 19 if (y > 0) 20 return barriers_1[(int) (y - 2) / MAP_CELL_HEIGHT][(int) x 21 / MAP_CELL_WIDTH] != 0; 22 else 23 return true; 24 } 25 26 public static boolean onCeiling(float x, float y) { 27 return barriers_2[(int) (y - 2) / MAP_CELL_HEIGHT][(int) x 28 / MAP_CELL_WIDTH] != 0; 29 } 30 31 public static boolean fight(Lead lead, Monster monster) { 32 if (lead.x + 32f > monster.x && lead.x < monster.x + 32 33 && lead.y > monster.y - 32f && lead.y < monster.y + 32) { 34 return true; 35 } 36 return false; 37 38 } 39 40 } Collision 1 package com.me.mygdxgame; 2 3 import java.util.ArrayList; 4 5 import com.badlogic.gdx.Game; 6 import com.badlogic.gdx.Gdx; 7 import com.badlogic.gdx.Screen; 8 import com.badlogic.gdx.graphics.GL10; 9 import com.badlogic.gdx.graphics.OrthographicCamera; 10 import com.badlogic.gdx.graphics.Texture; 11 import com.badlogic.gdx.graphics.g2d.SpriteBatch; 12 import com.badlogic.gdx.graphics.g2d.TextureAtlas; 13 import com.badlogic.gdx.graphics.g2d.TextureRegion; 14 import com.badlogic.gdx.maps.MapLayer; 15 import com.badlogic.gdx.maps.MapLayers; 16 import com.badlogic.gdx.maps.MapObject; 17 import com.badlogic.gdx.maps.MapObjects; 18 import com.badlogic.gdx.maps.objects.RectangleMapObject; 19 import com.badlogic.gdx.maps.tiled.TiledMap; 20 import com.badlogic.gdx.maps.tiled.TiledMapTileLayer; 21 import com.badlogic.gdx.maps.tiled.TiledMapTileLayer.Cell; 22 import com.badlogic.gdx.maps.tiled.TmxMapLoader; 23 import com.badlogic.gdx.maps.tiled.renderers.OrthogonalTiledMapRenderer; 24 import com.badlogic.gdx.scenes.scene2d.InputEvent; 25 import com.badlogic.gdx.scenes.scene2d.InputListener; 26 import com.badlogic.gdx.scenes.scene2d.Stage; 27 import com.badlogic.gdx.scenes.scene2d.ui.ImageButton; 28 import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable; 29 30 public class GameScreen implements Screen { 31 32 Game game; 33 34 public static int[][] barriers_1; 35 public static int[][] barriers_2; 36 public static TiledMap map; 37 public static Lead lead; 38 public static ArrayList<Monster> monsters = new ArrayList<Monster>(); 39 40 private OrthographicCamera camera; 41 private OrthogonalTiledMapRenderer render; 42 public Stage stage; 43 private MapLayers layers; 44 private SpriteBatch batch; 45 46 private ImageButton pauseButton; 47 48 private PauseScreen pauseScreen; 49 50 private TextureAtlas bgi; 51 private TextureAtlas bgi2; 52 private TextureRegion region1; 53 private TextureRegion region2; 54 private TextureRegion region3; 55 private TextureRegion region4; 56 57 float bg1x, bg1y, bg2x, bg2y; 58 float bg3x, bg3y, bg4x, bg4y; 59 60 STATE state = STATE.Run; 61 62 enum STATE { 63 Stop, Run 64 }; 65 66 public GameScreen(Game game){ 67 super(); 68 this.game = game;pauseScreen = new PauseScreen(this); 69 70 lead = new Lead(0, 0); 71 72 map = new TmxMapLoader().load("data/test3.tmx"); 73 74 barriers_1 = new int[11][30]; 75 barriers_2 = new int[10][30]; 76 77 // setWindows(); 78 79 setBackground(); 80 81 setButton(); 82 83 render = new OrthogonalTiledMapRenderer(map); 84 85 camera = new OrthographicCamera(); 86 camera.setToOrtho(false, 480, 320); 87 88 stage = new Stage(480, 320, false); 89 this.setMap(); 90 91 for (int i = 0; i < monsters.size(); i++) { 92 stage.addActor(monsters.get(i)); 93 } 94 95 stage.addActor(lead); 96 stage.addActor(lead.buttonUp); 97 stage.addActor(lead.buttonDown); 98 stage.addActor(lead.tblood); 99 stage.addActor(pauseButton); 100 101 102 } 103 104 @Override 105 public void show() { 106 Gdx.input.setInputProcessor(stage); 107 } 108 109 private void setBackground() { 110 bgi = new TextureAtlas(Gdx.files.internal("data/background")); 111 bgi2 = new TextureAtlas(Gdx.files.internal("data/background")); 112 batch = new SpriteBatch(); 113 region1 = bgi.findRegion("sky"); 114 region2 = bgi2.findRegion("sky"); 115 region1.flip(true, false); 116 region3 = bgi.findRegion("moutan"); 117 region4 = region3; 118 119 bg1y = bg2y = 0; 120 bg3y = bg4y = 0; 121 bg1x = 0; 122 bg3x = 0; 123 bg2x = bg1x + region1.getRegionWidth(); 124 bg4x = bg3x + region3.getRegionWidth(); 125 126 } 127 128 private void setButton() { 129 pauseButton = new ImageButton(new TextureRegionDrawable( 130 new TextureRegion(new Texture( 131 Gdx.files.internal("data/red.png")), 32, 32))); 132 pauseButton.addListener(new InputListener() { 133 @Override 134 public void touchUp(InputEvent event, float x, float y, 135 int pointer, int button) { 136 super.touchUp(event, x, y, pointer, button); 137 } 138 139 @Override 140 public boolean touchDown(InputEvent event, float x, float y, 141 int pointer, int button) { 142 pause(); 143 return true; 144 } 145 146 }); 147 } 148 149 @Override 150 public void render(float delta) { 151 Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); 152 if (lead.x + 100 >= camera.position.x) { 153 camera.position.x = lead.x + 100; 154 stage.getCamera().position.x = lead.x + 100; 155 156 bg1x -= 1; 157 bg2x -= 1; 158 bg3x -= 2; 159 bg4x -= 2; 160 } 161 camera.update(); 162 render.setView(camera); 163 164 update(); 165 stage.act(); 166 draw(); 167 168 } 169 170 public void draw() { 171 batch.begin(); 172 batch.draw(region1, bg1x, bg1y); 173 batch.draw(region2, bg2x, bg2y); 174 batch.draw(region3, bg3x, bg3y); 175 batch.draw(region4, bg4x, bg4y); 176 batch.end(); 177 render.render(); 178 stage.draw(); 179 } 180 181 public void update() { 182 183 lead.buttonUp.setPosition(camera.position.x - 220f, 20f); 184 lead.buttonDown.setPosition(camera.position.x + 190f, 20f); 185 186 lead.tblood.setPosition(camera.position.x - 220f, 300f); 187 lead.tblood.setScaleX((float) lead.blood / lead.lim_blood); 188 189 pauseButton.setPosition(camera.position.x + 190f, 280f); 190 191 fight(); 192 bgmove(); 193 } 194 195 private void bgmove() { 196 197 float RH1; 198 float RH2; 199 200 RH1 = region1.getRegionWidth(); 201 RH2 = region3.getRegionWidth(); 202 if (bg1x < -RH1) { 203 bg1x = bg2x + RH1; 204 } 205 if (bg2x < -RH1) { 206 bg2x = bg1x + RH1; 207 } 208 if (bg3x < -RH1) { 209 bg3x = bg4x + RH2; 210 } 211 if (bg4x < -RH1) { 212 bg4x = bg3x + RH2; 213 } 214 215 216 } 217 218 public void setMap() { 219 layers = map.getLayers(); 220 for (MapLayer layer : layers) { 221 if (layer.getName().equals("actor")) { 222 MapObjects objs = layer.getObjects(); 223 for (MapObject obj : objs) { 224 RectangleMapObject ro = (RectangleMapObject) obj; 225 Monster monster; 226 if (ro.getName().equals("lead")) { 227 228 lead.x = ro.getRectangle().x; 229 lead.y = ro.getRectangle().y; 230 231 } else if (ro.getName().equals("monster")) { 232 233 monster = new Monster(ro.getRectangle().x, 234 ro.getRectangle().y); 235 monster.blood = Integer.parseInt((String) ro 236 .getProperties().get("blood")); 237 monster.attack = Integer.parseInt((String) ro 238 .getProperties().get("attack")); 239 // monster.defence = Integer.parseInt((String) 240 // ro.getProperties().get("defence")); 241 monsters.add(monster); 242 // monster.x = ro.getRectangle().x; 243 // monster.y = ro.getRectangle().y; 244 245 } 246 } 247 } else if (layer.getName().equals("barriers_1")) { 248 if (layer instanceof TiledMapTileLayer) { 249 TiledMapTileLayer tileLayer = (TiledMapTileLayer) layer; 250 // j為高(行) i為寬(列) 251 for (int j = 11; j > 0; j--) { 252 for (int i = 0; i < 30; i++) { 253 // getCell(列,行) 縱坐標(biāo)翻轉(zhuǎn) 254 Cell cell = tileLayer.getCell(i, j); 255 if (cell != null) { 256 barriers_1[j][i] = 1; 257 } 258 } 259 } 260 261 } 262 } else if (layer.getName().equals("barriers_2")) { 263 if (layer instanceof TiledMapTileLayer) { 264 TiledMapTileLayer tileLayer = (TiledMapTileLayer) layer; 265 // j為高(行) i為寬(列) 266 for (int j = 10; j > 0; j--) { 267 for (int i = 0; i < 30; i++) { 268 // getCell(列,行) 縱坐標(biāo)翻轉(zhuǎn) 269 Cell cell = tileLayer.getCell(i, j); 270 if (cell != null) { 271 barriers_2[j][i] = 1; 272 } 273 } 274 } 275 276 } 277 } 278 } 279 } 280 281 private void fight() { 282 for (int i = 0; i < monsters.size(); i++) { 283 Monster monster = monsters.get(i); 284 if (Collision.fight(lead, monster)) { 285 monster.blood -= lead.attack; 286 lead.blood -= monster.attack; 287 288 // if(monster.attack - lead.defence > 0) 289 // lead.blood -= monster.attack - lead.defence; 290 // else 291 // lead.blood -= 1; 292 if (monster.blood < 0) { 293 monsters.remove(i); 294 stage.getRoot().removeActor(monster); 295 break; 296 } 297 lead.x -= 20; 298 monster.x += 20; 299 monster.state = Monster.STATE.Run; 300 System.out.println(lead.blood); 301 } 302 } 303 304 } 305 306 @Override 307 public void resize(int width, int height) { 308 // TODO Auto-generated method stub 309 310 } 311 312 @Override 313 public void pause() { 314 game.setScreen(pauseScreen); 315 // stage.dispose(); 316 } 317 318 public Game getGame(){ 319 return game; 320 } 321 322 @Override 323 public void hide() { 324 // TODO Auto-generated method stub 325 326 } 327 328 @Override 329 public void resume() { 330 game.setScreen(this); 331 332 } 333 334 @Override 335 public void dispose() { 336 // TODO Auto-generated method stub 337 338 } 339 340 } GameScreen 1 package com.me.mygdxgame; 2 3 import com.badlogic.gdx.Gdx; 4 import com.badlogic.gdx.graphics.Texture; 5 import com.badlogic.gdx.graphics.g2d.Animation; 6 import com.badlogic.gdx.graphics.g2d.SpriteBatch; 7 import com.badlogic.gdx.graphics.g2d.TextureRegion; 8 import com.badlogic.gdx.scenes.scene2d.Actor; 9 import com.badlogic.gdx.scenes.scene2d.InputEvent; 10 import com.badlogic.gdx.scenes.scene2d.InputListener; 11 import com.badlogic.gdx.scenes.scene2d.ui.Image; 12 import com.badlogic.gdx.scenes.scene2d.ui.ImageButton; 13 import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable; 14 15 public class Lead extends Actor { 16 public float x; 17 public float y; 18 public float statetime; 19 public int count; 20 21 public int blood; 22 public int attack; 23 // public int defence; 24 public int lim_blood; 25 26 private TextureRegion currentFrame; 27 private Animation walk; 28 public ImageButton buttonUp; 29 public ImageButton buttonDown; 30 public Image tblood; 31 32 public STATE state; 33 34 enum STATE { 35 Air, Floor, Ceiling, JumpUp, JumpDown 36 }; 37 38 public Lead(float x, float y) { 39 this.x = x; 40 this.y = y; 41 lim_blood = 20; 42 blood = lim_blood; 43 attack = 2; 44 // defence = 3; 45 state = STATE.Air; 46 statetime = 0; 47 show(); 48 } 49 50 @Override 51 public void act(float delta) { 52 statetime += delta; 53 check(); 54 update(); 55 currentFrame = walk.getKeyFrame(statetime, true); 56 super.act(delta); 57 } 58 59 private void check() { 60 if (Collision.onFloor(x, y) && state == STATE.Air) { 61 state = STATE.Floor; 62 } else if (Collision.onCeiling(x, y) && state == STATE.Air) { 63 state = STATE.Ceiling; 64 } else if (!Collision.onCeiling(x, y) && !Collision.onFloor(x, y) 65 && state != STATE.JumpUp && state != STATE.JumpDown) { 66 state = STATE.Air; 67 } 68 } 69 70 private void update() { 71 x += 1f; 72 if (state == STATE.Air) { 73 y -= 2f; 74 } 75 if (state == STATE.JumpUp) { 76 y += 2f; 77 count--; 78 if (0 == count) { 79 state = STATE.Air; 80 } 81 } 82 if (state == STATE.JumpDown) { 83 y -= 2f; 84 count--; 85 if (0 == count) { 86 state = STATE.Air; 87 } 88 } 89 90 } 91 92 @Override 93 public void draw(SpriteBatch batch, float parentAlpha) { 94 95 batch.draw(currentFrame, x, y); 96 } 97 98 public void show() { 99 100 tblood = new Image(new Texture(Gdx.files.internal("data/blood.png"))); 101 102 TextureRegion[] regionWalk = new TextureRegion[2]; 103 TextureRegion[] regionJumpUp = new TextureRegion[2]; 104 TextureRegion[] regionJumpDown = new TextureRegion[2]; 105 regionWalk[0] = new TextureRegion(new Texture( 106 Gdx.files.internal("data/red.png")), 32, 32); 107 regionWalk[1] = new TextureRegion(new Texture( 108 Gdx.files.internal("data/blue.png")), 32, 32); 109 regionJumpUp[0] = new TextureRegion(new Texture( 110 Gdx.files.internal("data/red.png")), 32, 32); 111 regionJumpUp[1] = new TextureRegion(new Texture( 112 Gdx.files.internal("data/blue.png")), 32, 32); 113 regionJumpDown[0] = new TextureRegion(new Texture( 114 Gdx.files.internal("data/red.png")), 32, 32); 115 regionJumpDown[1] = new TextureRegion(new Texture( 116 Gdx.files.internal("data/blue.png")), 32, 32); 117 walk = new Animation(0.1f, regionWalk); 118 119 buttonUp = new ImageButton(new TextureRegionDrawable(regionJumpUp[0]), 120 new TextureRegionDrawable(regionJumpUp[1])); 121 buttonDown = new ImageButton(new TextureRegionDrawable( 122 regionJumpDown[0]), 123 new TextureRegionDrawable(regionJumpDown[1])); 124 125 // buttonUp.setPosition(20, 20); 126 // buttonDown.setPosition(420, 20); 127 buttonUp.addListener(new InputListener() { 128 129 @Override 130 public void touchUp(InputEvent event, float x, float y, 131 int pointer, int button) { 132 super.touchUp(event, x, y, pointer, button); 133 } 134 135 @Override 136 public boolean touchDown(InputEvent event, float x, float y, 137 int pointer, int button) { 138 if (state == STATE.Ceiling || state == STATE.Floor) { 139 state = STATE.JumpUp; 140 count = 64; 141 } 142 return true; 143 } 144 145 }); 146 147 buttonDown.addListener(new InputListener() { 148 149 @Override 150 public void touchUp(InputEvent event, float x, float y, 151 int pointer, int button) { 152 super.touchUp(event, x, y, pointer, button); 153 } 154 155 @Override 156 public boolean touchDown(InputEvent event, float x, float y, 157 int pointer, int button) { 158 if (state == STATE.Ceiling) { 159 state = STATE.JumpDown; 160 count = 32; 161 } 162 return true; 163 } 164 165 }); 166 } 167 168 } Lead 1 package com.me.mygdxgame; 2 3 import com.badlogic.gdx.Gdx; 4 import com.badlogic.gdx.graphics.Texture; 5 import com.badlogic.gdx.graphics.g2d.SpriteBatch; 6 import com.badlogic.gdx.graphics.g2d.TextureRegion; 7 import com.badlogic.gdx.scenes.scene2d.Actor; 8 9 public class Monster extends Actor{ 10 public float x; 11 public float y; 12 public int blood; 13 public int attack; 14 // public int defence; 15 16 private Texture texture; 17 private TextureRegion region; 18 19 public STATE state; 20 21 enum STATE { 22 Stop,Run 23 }; 24 25 public Monster(float x,float y){ 26 this.state = STATE.Stop; 27 this.x = x; 28 this.y = y; 29 this.creat(); 30 } 31 32 private void creat() { 33 texture = new Texture(Gdx.files.internal("data/green.png")); 34 region = new TextureRegion(texture,32,32); 35 } 36 37 @Override 38 public void draw(SpriteBatch batch, float parentAlpha) { 39 batch.draw(region,this.x,y); 40 } 41 42 @Override 43 public void act(float delta) { 44 this.update(); 45 this.check(); 46 super.act(delta); 47 } 48 49 private void check() { 50 51 } 52 53 private void update() { 54 if(state == STATE.Run){ 55 x -= 1f; 56 } 57 58 } 59 60 // private void check() { 61 // // TODO Auto-generated method stub 62 // 63 // } 64 65 66 67 } Monster 1 package com.me.mygdxgame; 2 3 import com.badlogic.gdx.Game; 4 5 public class MyGame extends Game { 6 GameScreen gameScreen; 7 StartScreen startScreen; 8 PauseScreen pauseScreen; 9 10 @Override 11 public void create() { 12 startScreen = new StartScreen(); 13 gameScreen = new GameScreen(this); 14 // this .setScreen(startScreen); 15 this.setScreen(gameScreen); 16 } 17 18 } MyGame 1 package com.me.mygdxgame; 2 3 import com.badlogic.gdx.Gdx; 4 import com.badlogic.gdx.Screen; 5 import com.badlogic.gdx.graphics.GL10; 6 import com.badlogic.gdx.graphics.Texture; 7 import com.badlogic.gdx.graphics.g2d.TextureRegion; 8 import com.badlogic.gdx.scenes.scene2d.InputEvent; 9 import com.badlogic.gdx.scenes.scene2d.InputListener; 10 import com.badlogic.gdx.scenes.scene2d.Stage; 11 import com.badlogic.gdx.scenes.scene2d.ui.ImageButton; 12 import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable; 13 14 public class PauseScreen implements Screen { 15 16 GameScreen gameScreen; 17 private Stage stage; 18 private ImageButton keeponButton; 19 private TextureRegion[] region; 20 21 public PauseScreen(GameScreen gameScreen) { 22 super(); 23 this.gameScreen = gameScreen; 24 } 25 26 @Override 27 public void render(float delta) { 28 // TODO Auto-generated method stub 29 Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); 30 gameScreen.draw(); 31 stage.act(); 32 stage.draw(); 33 } 34 35 @Override 36 public void resize(int width, int height) { 37 // TODO Auto-generated method stub 38 39 } 40 41 @Override 42 public void show() { 43 stage = new Stage(480, 320, false); 44 45 region = new TextureRegion[2]; 46 47 region[0] = new TextureRegion(new Texture( 48 Gdx.files.internal("data/red.png")), 32, 32); 49 region[1] = new TextureRegion(new Texture( 50 Gdx.files.internal("data/blue.png")), 32, 32); 51 52 keeponButton = new ImageButton(new TextureRegionDrawable(region[0]), 53 new TextureRegionDrawable(region[1])); 54 keeponButton.setPosition(100, 100); 55 stage.addActor(keeponButton); 56 Gdx.input.setInputProcessor(stage); 57 keeponButton.addListener(new InputListener() { 58 @Override 59 public void touchUp(InputEvent event, float x, float y, 60 int pointer, int button) { 61 super.touchUp(event, x, y, pointer, button); 62 } 63 64 @Override 65 public boolean touchDown(InputEvent event, float x, float y, 66 int pointer, int button) { 67 stage.dispose(); 68 gameScreen.getGame().setScreen(gameScreen); 69 return true; 70 } 71 72 }); 73 } 74 75 @Override 76 public void hide() { 77 // TODO Auto-generated method stub 78 79 } 80 81 @Override 82 public void pause() { 83 // TODO Auto-generated method stub 84 85 } 86 87 @Override 88 public void resume() { 89 // TODO Auto-generated method stub 90 91 } 92 93 @Override 94 public void dispose() { 95 // TODO Auto-generated method stub 96 97 } 98 99 } PauseScreen 1 package com.me.mygdxgame; 2 3 import com.badlogic.gdx.Screen; 4 5 public class StartScreen implements Screen{ 6 7 @Override 8 public void render(float delta) { 9 10 } 11 12 @Override 13 public void resize(int width, int height) { 14 15 } 16 17 @Override 18 public void show() { 19 20 } 21 22 @Override 23 public void hide() { 24 25 } 26 27 @Override 28 public void pause() { 29 30 } 31 32 @Override 33 public void resume() { 34 35 } 36 37 @Override 38 public void dispose() { 39 40 } 41 42 } StartScreen?
四,測(cè)試及性能測(cè)試
敬請(qǐng)期待.....
五,總結(jié)
?
到此為止整個(gè)游戲的從
?????????????????????????????????????? 收集素材,整理素材,美工切圖(張洋華)
策劃----------->設(shè)計(jì): 學(xué)習(xí)引擎框架,準(zhǔn)備編碼(黃少曦)
????????????????????????????????? ? 設(shè)計(jì)文檔,收集資料(楊卓)
?
????????????????????? ????? 修改設(shè)計(jì)界面
----------->實(shí)現(xiàn): 細(xì)節(jié)編碼 ????? ----------->? 調(diào)試,測(cè)試,性能分析(暫無(wú))
????????????????????? ????? 完善文檔
也算是有了點(diǎn)結(jié)果了,算起來(lái)作為一個(gè)導(dǎo)航員我已經(jīng)不是第一次做游戲了,但是在這個(gè)過(guò)程中所遇到的問(wèn)題還是很多,不管是設(shè)計(jì)上還是編碼有很多地方存在不足之處,在一邊抓緊進(jìn)度的同時(shí)也盡力尋求突破口,整個(gè)過(guò)程確確實(shí)實(shí)給了我們?nèi)齻€(gè)很大的挑戰(zhàn),非常感謝也很感動(dòng)我們這個(gè)特別的三人組(老師要求的是結(jié)對(duì)編程)的兩位小伙伴在整個(gè)過(guò)程中的堅(jiān)持不懈,毫無(wú)怨言,華仔(張洋華)在切圖的過(guò)程中,連續(xù)很多個(gè)小時(shí)盯著PS不斷的修修修改改改,那種感覺(jué)不是每個(gè)人都能體會(huì)到都能承受的;對(duì)于少爺(黃少曦)實(shí)實(shí)在在的很感動(dòng),斷斷續(xù)續(xù)也算是熬了好多個(gè)半夜吧,真的辛苦了。我想不管結(jié)果怎么樣,我相信對(duì)于我們?nèi)齻€(gè)收獲的東西已經(jīng)足夠多了,一次有始有終還蠻成功的合作并沒(méi)有到12點(diǎn)就截止,在這個(gè)過(guò)程中明確的分工讓我們體會(huì)到了團(tuán)隊(duì)的重要性,彼此對(duì)于作為團(tuán)隊(duì)成員的重要性,你給與別人的信任相同的他也是一樣的信任于你;前前后后蹲實(shí)驗(yàn)室也是蹲了很多天,少了蠻多的休息和娛樂(lè)的時(shí)間,換回來(lái)的不只是一個(gè)簡(jiǎn)單的游戲,更多的是對(duì)于未來(lái)的明確和下一步的目標(biāo),只要我們堅(jiān)持下去,勝利的鐘聲肯定是為我們敲響的。
????? We are all running hero.
原諒我笨拙的英語(yǔ),總之一起加油吧,兄弟。
轉(zhuǎn)載于:https://www.cnblogs.com/qimumu/p/4114434.html
總結(jié)
以上是生活随笔為你收集整理的Running Hero.的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: eigen 编译_头条 | 使用eige
- 下一篇: NB模组基本AT指令