|
|
|
@ -5,6 +5,7 @@ package com.msb.model;/**
|
|
|
|
|
* @Version: 1.0
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import com.msb.TankFrame;
|
|
|
|
|
import com.msb.base.PropertyMgr;
|
|
|
|
|
import com.msb.chain.ColliderChain;
|
|
|
|
|
import com.msb.enums.DirEnum;
|
|
|
|
@ -59,6 +60,13 @@ public class GameModel {
|
|
|
|
|
// tankFrame.tanks.add(new Tank(100 + i*80, 100, DirEnum.valueOf(random.nextInt(30)%4), GroupEnum.BAD, tankFrame));
|
|
|
|
|
gameObjects.add(new Tank(100 + i*120, 100, DirEnum.DOWN, GroupEnum.BAD));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//上面两块
|
|
|
|
|
add(new Wall(TankFrame.GAME_WIDTH/4*1-200/2, TankFrame.GAME_HEIGHT/4*1-50/2, 200, 50));
|
|
|
|
|
add(new Wall(TankFrame.GAME_WIDTH/4*3-200/2, TankFrame.GAME_HEIGHT/4*1-50/2, 200, 50));
|
|
|
|
|
//下面两块
|
|
|
|
|
add(new Wall(TankFrame.GAME_WIDTH/4*1-50/2, TankFrame.GAME_HEIGHT/4*3-200/2, 50, 200));
|
|
|
|
|
add(new Wall(TankFrame.GAME_WIDTH/4*3-50/2, TankFrame.GAME_HEIGHT/4*3-200/2, 50, 200));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void paint(Graphics g) {
|
|
|
|
|