[editor] update Frames
This commit is contained in:
@@ -53,13 +53,6 @@ import ru.m.tankz.Type;
|
||||
|
||||
private function changePause(value:Bool):Void {}
|
||||
|
||||
private function applyPosition(entity:Entity, position:Position):Void {
|
||||
entity.rect.center = new Point(position.x, position.y);
|
||||
if (position.direction != null) {
|
||||
entity.rect.direction = position.direction;
|
||||
}
|
||||
}
|
||||
|
||||
public inline function getTeam(teamId:TeamId):Team {
|
||||
return teams[teamId];
|
||||
}
|
||||
@@ -75,9 +68,6 @@ import ru.m.tankz.Type;
|
||||
case COMPLETE(result):
|
||||
this.state = result.state;
|
||||
this.winner = result.winner;
|
||||
case SPAWN(EAGLE(id, rect, teamId)):
|
||||
var team = getTeam(teamId);
|
||||
team.eagleId = id;
|
||||
case SPAWN(TANK(id, rect, playerId, info)):
|
||||
if (controls.exists(playerId)) {
|
||||
var control = controls[playerId];
|
||||
|
||||
@@ -383,6 +383,9 @@ class GameRunner extends Game implements EngineListener {
|
||||
case ACTION(tankId, STOP):
|
||||
gameEventSignal.emit(STOP(TANK(tankId)));
|
||||
engine.stop(tankId);
|
||||
case SPAWN(EAGLE(id, rect, teamId)):
|
||||
var team = getTeam(teamId);
|
||||
team.eagleId = id;
|
||||
case SPAWN(BULLET(_, _, playerId, _)):
|
||||
getPlayer(playerId).bullets++;
|
||||
case DESTROY(EAGLE(id, shot)):
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
package ru.m.tankz.map;
|
||||
|
||||
import ru.m.tankz.config.Config.GridSize;
|
||||
import ru.m.tankz.config.Config.CellSize;
|
||||
import haxe.ds.HashMap;
|
||||
import ru.m.geom.Line;
|
||||
import ru.m.geom.Point;
|
||||
import ru.m.geom.Rectangle;
|
||||
import haxe.ds.HashMap;
|
||||
|
||||
|
||||
class GridCell {
|
||||
public var cellX(default, null):Int;
|
||||
@@ -42,7 +39,6 @@ class GridCell {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class Grid {
|
||||
public var cellWidth(default, null):Int;
|
||||
public var cellHeight(default, null):Int;
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
package ru.m.tankz.map;
|
||||
|
||||
import ru.m.tankz.Type.BrickType;
|
||||
import haxe.ds.HashMap;
|
||||
import ru.m.tankz.map.Grid;
|
||||
import ru.m.geom.Point;
|
||||
import ru.m.tankz.config.Config;
|
||||
|
||||
import ru.m.tankz.map.Grid;
|
||||
|
||||
class LevelMap {
|
||||
|
||||
@@ -30,7 +28,7 @@ class LevelMap {
|
||||
cellWidth = config.cell.width;
|
||||
cellHeight = config.cell.width;
|
||||
gridWidth = size != null ? size.width : config.grid.width;
|
||||
gridHeight = size != null ? size.height : config.grid.width;
|
||||
gridHeight = size != null ? size.height : config.grid.height;
|
||||
bricksMap = new HashMap();
|
||||
bricks = [];
|
||||
grid = new Grid(
|
||||
|
||||
Reference in New Issue
Block a user