[editor] tanks colors
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
package ru.m.tankz.core;
|
||||
|
||||
import ru.m.tankz.config.Config.EagleConfig;
|
||||
import haxework.color.Color;
|
||||
import ru.m.geom.Rectangle;
|
||||
import ru.m.tankz.config.Config;
|
||||
import ru.m.tankz.Type;
|
||||
|
||||
class Eagle extends Entity {
|
||||
|
||||
public var team(default, null):TeamId;
|
||||
public var config(default, null):EagleConfig;
|
||||
public var color(default, default):Color;
|
||||
public var death(default, default):Bool;
|
||||
public var protect(default, null):Modificator;
|
||||
|
||||
|
||||
@@ -139,6 +139,7 @@ class Game {
|
||||
var eaglePoint = team.spawner.getPoint('eagle');
|
||||
if (eaglePoint != null) {
|
||||
var eagle = new Eagle(team.id, team.config.eagle);
|
||||
eagle.color = config.getColor(new PlayerId(eagle.team, -1));
|
||||
team.eagleId = eagle.id;
|
||||
applyPoint(eagle, eaglePoint);
|
||||
engine.spawn(eagle);
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
points: [{y: 0, team: alpha, x: 0, direction: right, type: tank, index: 0}, {y: 0, team: beta, x: 6, direction: right, type: tank, index: 0}, {y: 0, team: gamma, x: 12, direction: right, type: tank, index: 0}, {y: 0, team: delta, x: 18, direction: right, type: tank, index: 0}, {y: 18, team: epsilon, x: 0, direction: right, type: tank, index: 0}, {y: 18, team: zeta, x: 6, direction: right, type: tank, index: 0}, {y: 18, team: eta, x: 12, direction: right, type: tank, index: 0}, {y: 18, team: theta, x: 18, direction: right, type: tank, index: 0}]
|
||||
data: "0004400004400004400000044000044000044000555555555555555555550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000555555555555555555550004400004400004400000044000044000044000"
|
||||
points: [{y: 0, type: tank, direction: right, x: 0, team: alpha, index: 0}, {y: 0, type: tank, direction: right, x: 6, team: beta, index: 0}, {y: 0, type: tank, direction: right, x: 12, team: gamma, index: 0}, {y: 0, type: tank, direction: right, x: 18, team: delta, index: 0}, {y: 18, type: tank, direction: right, x: 0, team: epsilon, index: 0}, {y: 18, type: tank, direction: right, x: 6, team: zeta, index: 0}, {y: 18, type: tank, direction: right, x: 12, team: eta, index: 0}, {y: 18, type: tank, direction: right, x: 18, team: theta, index: 0}]
|
||||
data: "0004400004400004400000044000044000044000555555555555555555550000000000000000000002520000022000002520055503330550333055500252035502205530252000000352000025300000000000000110000000000525252011110252525005252520111102525250000000000110000000000000035200002530000002520355022055302520055503330550333055500252000002200000252000000000000000000000555555555555555555550004400004400004400000044000044000044000"
|
||||
|
||||
Reference in New Issue
Block a user