[common] added teams
This commit is contained in:
@@ -8,11 +8,8 @@ import haxework.provider.Provider;
|
||||
import protohx.Message;
|
||||
import ru.m.connect.IConnection;
|
||||
import ru.m.tankz.config.ConfigBundle;
|
||||
import ru.m.tankz.control.PlayerControl;
|
||||
import ru.m.tankz.engine.Engine;
|
||||
import ru.m.tankz.game.ClassicGame;
|
||||
import ru.m.tankz.game.Game;
|
||||
import ru.m.tankz.player.Player;
|
||||
import ru.m.tankz.proto.pack.GameUpdateResponse;
|
||||
|
||||
|
||||
@@ -23,7 +20,7 @@ class GameFrame extends VGroupView implements ViewBuilder implements IPacketHand
|
||||
|
||||
public static inline var ID = "game";
|
||||
|
||||
private var game:Game;
|
||||
private var game:Game<Dynamic>;
|
||||
private var timer:Timer;
|
||||
|
||||
public function init():Void {
|
||||
@@ -31,9 +28,10 @@ class GameFrame extends VGroupView implements ViewBuilder implements IPacketHand
|
||||
|
||||
public function onShow():Void {
|
||||
game = new ClassicGame(ConfigBundle.get(ClassicGame.TYPE, 0));
|
||||
game.start([
|
||||
new Player(1)
|
||||
]);
|
||||
game.start({
|
||||
humans: 1,
|
||||
bots: 3,
|
||||
});
|
||||
content.addEventListener(Event.ENTER_FRAME, redraw);
|
||||
Provider.get(IConnection).packetHandler.addListener(this);
|
||||
render.draw(game.engine);
|
||||
|
||||
Reference in New Issue
Block a user