Added a Gaia player and added some random stones
This commit is contained in:
parent
397fb7ebd0
commit
65747bd267
40 changed files with 1316 additions and 45 deletions
|
|
@ -5,6 +5,11 @@ import ei.engine.math.Vector2i;
|
|||
import ei.engine.math.Vector3f;
|
||||
import ei.engine.scene.Node;
|
||||
import ei.engine.scene.Sprite;
|
||||
import ei.game.gamestate.InGameState;
|
||||
import ei.game.player.GaiaPlayer;
|
||||
import ei.game.player.Player;
|
||||
import ei.game.player.PlayerHandler;
|
||||
import ei.game.scene.map.Stone;
|
||||
|
||||
public class Map {
|
||||
private static final int POS_SIZE = 50;
|
||||
|
|
@ -16,10 +21,10 @@ public class Map {
|
|||
public Map(int w, int h){
|
||||
this.width = w;
|
||||
this.hight = h;
|
||||
init();
|
||||
//init();
|
||||
}
|
||||
|
||||
private void init(){
|
||||
public void init(){
|
||||
map = new GameEntity[width][hight];
|
||||
|
||||
// init textures
|
||||
|
|
@ -32,6 +37,12 @@ public class Map {
|
|||
mapNode.add(s);
|
||||
}
|
||||
}
|
||||
|
||||
Player gaia = new GaiaPlayer();
|
||||
PlayerHandler.getInstance().addPlayer(gaia);
|
||||
for(int i=0; i<5 ;i++){
|
||||
gaia.addUnit(new Stone(new Vector2i((int)(Math.random()*width),(int)(Math.random()*hight)),gaia));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue