From d67d4e5709912f2bd489f3141b8d29b84d0ba842 Mon Sep 17 00:00:00 2001 From: shmyga Date: Fri, 30 Aug 2019 16:06:45 +0300 Subject: [PATCH] [editor] fix --- .../haxe/ru/m/tankz/editor/view/map/MapEditView.hx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/editor/haxe/ru/m/tankz/editor/view/map/MapEditView.hx b/src/editor/haxe/ru/m/tankz/editor/view/map/MapEditView.hx index 02aa3ce..7cc38e7 100644 --- a/src/editor/haxe/ru/m/tankz/editor/view/map/MapEditView.hx +++ b/src/editor/haxe/ru/m/tankz/editor/view/map/MapEditView.hx @@ -1,6 +1,5 @@ package ru.m.tankz.editor.view.map; -import ru.m.tankz.util.LevelUtil; import flash.display.Graphics; import flash.events.MouseEvent; import ru.m.geom.Point; @@ -13,7 +12,8 @@ import ru.m.tankz.game.IGame; import ru.m.tankz.map.Brick; import ru.m.tankz.map.LevelMap; import ru.m.tankz.render.Render; -import ru.m.tankz.Type.PlayerId; +import ru.m.tankz.Type; +import ru.m.tankz.util.LevelUtil; enum Brush { POINT(point:SpawnPoint); @@ -126,7 +126,15 @@ enum Brush { var playerId = new PlayerId(point.team, point.index < 0 ? 0 : point.index); var player = config.getPlayer(playerId); var tankSpawn = player.tanks[0]; - var tank = builder.buildTank(point, playerId, tankSpawn.type, 0, playerId.toString(), true); + var tankInfo:TankInfo = { + type: tankSpawn.type, + skin: config.getTank(tankSpawn.type).skin, + hits: 0, + bonus: false, + color: config.getColor(playerId), + name: playerId.format(), + } + var tank = builder.buildTank(point, playerId, tankInfo); pointEntities[pointKey(point)] = tank; gameEventSignal.emit(EventUtil.buildTankSpawn(tank)); }