[editor] MapFrame rework

This commit is contained in:
2019-06-13 16:23:22 +03:00
parent 5798fa9db7
commit dc1279f636
9 changed files with 97 additions and 102 deletions

View File

@@ -42,7 +42,7 @@ typedef BrickConfig = {
var type:BrickType;
var index:Int;
var layer:Int;
var armor:Int;
var armor:Float;
}
typedef BulletConfig = {

View File

@@ -15,10 +15,10 @@ class GridCell {
public var position(default, null):Point;
public var rect(default, null):Rectangle;
public var layer:Int;
public var armor:Int;
public var armor:Float;
public var destroyed(default, set):Bool;
public function new(cellX:Int, cellY:Int, width:Int, height:Int, layer:Int, armor:Int) {
public function new(cellX:Int, cellY:Int, width:Int, height:Int, layer:Int, armor:Float) {
this.cellX = cellX;
this.cellY = cellY;
this.position = new Point(cellX, cellY);

View File

@@ -1,5 +1,5 @@
game:
levels: 3
levels: 4
friendlyFire: true
complete:
- team: alpha
@@ -20,6 +20,7 @@ bricks:
- {type: water, index: 3, layer: 1, armor: 0}
- {type: armor, index: 4, layer: 2, armor: 2}
- {type: brick, index: 5, layer: 2, armor: 1}
- {type: wood, index: 6, layer: 2, armor: 0.5}
player:
default: &player

View File

@@ -0,0 +1,4 @@
name: ""
points: [{x: 2, y: 8, direction: right, index: 0, team: alpha, type: tank}, {x: 8, y: 2, direction: right, index: 0, team: beta, type: tank}, {x: 20, y: 2, direction: right, index: 0, team: gamma, type: tank}, {x: 26, y: 8, direction: right, index: 0, team: delta, type: tank}, {x: 26, y: 20, direction: right, index: 0, team: epsilon, type: tank}, {x: 20, y: 26, direction: right, index: 0, team: zeta, type: tank}, {x: 8, y: 26, direction: right, index: 0, team: eta, type: tank}, {x: 2, y: 20, direction: right, index: 0, team: theta, type: tank}]
size: {width: 30, height: 30}
data: "222222666666222222666666222222222222666666222222666666222222220000660066000000660066000022220000660066000000660066000022220000666666000000666666000022220000666666000000666666000022666666333333555555333333666666666666333333555555333333666666660066330000000000000033660066660066330000000000000033660066666666330000000000000033666666666666330000000000000033666666220000550000333333000055000022220000550000333333000055000022220000550000330033000055000022220000550000330033000055000022220000550000333333000055000022220000550000333333000055000022666666330000000000000033666666666666330000000000000033666666660066330000000000000033660066660066330000000000000033660066666666333333555555333333666666666666333333555555333333666666220000666666000000666666000022220000666666000000666666000022220000660066000000660066000022220000660066000000660066000022222222666666222222666666222222222222666666222222666666222222"