diff --git a/src/client/haxe/layout/frames/game.json b/src/client/haxe/layout/frames/game.json index 54ba073..19ea442 100644 --- a/src/client/haxe/layout/frames/game.json +++ b/src/client/haxe/layout/frames/game.json @@ -1,11 +1,6 @@ { "pWidth": 100, "pHeight": 100, "views": [ - { - "id": "name", "@type": "haxework.gui.LabelView", - "pWidth": 100, "height": 44, "text": "", - "@style": "label" - }, { "id": "render", "@type": "ru.m.tankz.render.Render", "contentSize": true diff --git a/src/client/haxe/layout/frames/game_list.json b/src/client/haxe/layout/frames/game_list.json index ffe1e4a..dfdd8d5 100644 --- a/src/client/haxe/layout/frames/game_list.json +++ b/src/client/haxe/layout/frames/game_list.json @@ -1,11 +1,6 @@ { "pWidth": 100, "pHeight": 100, "views": [ - { - "id": "name", "@type": "haxework.gui.LabelView", - "pWidth": 100, "height": 44, "text": "", - "@style": "label" - }, { "id": "create", "@type": "haxework.gui.ButtonView", "width": 132, "height": 44, diff --git a/src/client/haxe/layout/frames/game_ready.json b/src/client/haxe/layout/frames/game_ready.json index e5a8d7e..028dd28 100644 --- a/src/client/haxe/layout/frames/game_ready.json +++ b/src/client/haxe/layout/frames/game_ready.json @@ -1,11 +1,6 @@ { "pWidth": 100, "pHeight": 100, "views": [ - { - "id": "name", "@type": "haxework.gui.LabelView", - "pWidth": 100, "height": 44, "text": "", - "@style": "label" - }, { "id": "start", "@type": "haxework.gui.ButtonView", "width": 132, "height": 44, diff --git a/src/client/haxe/ru/m/tankz/render/Render.hx b/src/client/haxe/ru/m/tankz/render/Render.hx index 20979b4..2c8a799 100755 --- a/src/client/haxe/ru/m/tankz/render/Render.hx +++ b/src/client/haxe/ru/m/tankz/render/Render.hx @@ -82,6 +82,6 @@ class Render extends SpriteView implements IRender { 90; } else { 0; - }) / (Math.PI * 2); + }) * (Math.PI / 180); } } diff --git a/src/client/haxe/ru/m/tankz/view/frames/GameFrame.hx b/src/client/haxe/ru/m/tankz/view/frames/GameFrame.hx index eb4ebb1..2922fa7 100755 --- a/src/client/haxe/ru/m/tankz/view/frames/GameFrame.hx +++ b/src/client/haxe/ru/m/tankz/view/frames/GameFrame.hx @@ -27,7 +27,6 @@ class GameFrame extends VGroupView implements ViewBuilder implements IPacketHand public function onShow():Void { var person = Provider.get(GameData).person; var persons = Provider.get(GameData).game.persons; - name.text = person.name; engine.personId = person.id; engine.init(DEFAULT.CONFIG); content.addEventListener(Event.ENTER_FRAME, updateGame); diff --git a/src/client/haxe/ru/m/tankz/view/frames/GameListFrame.hx b/src/client/haxe/ru/m/tankz/view/frames/GameListFrame.hx index ca877c8..64fb6c4 100755 --- a/src/client/haxe/ru/m/tankz/view/frames/GameListFrame.hx +++ b/src/client/haxe/ru/m/tankz/view/frames/GameListFrame.hx @@ -27,13 +27,11 @@ class GameListFrame extends VGroupView implements ViewBuilder implements IPacket public static inline var ID = "game_list"; public function init() { - list = findViewById("list"); list.dispatcher.addListener(this); findViewById("create", ButtonView).onPress = this; } public function onShow() { - findViewById("name", LabelView).text = Provider.get(GameData).person.name; Provider.get(IConnection).packetHandler.addListener(this); Provider.get(IConnection).send(new GamesSubscribeRequest()); } diff --git a/src/common/haxe/ru/m/core/connect/neko/NekoConnection.hx b/src/common/haxe/ru/m/core/connect/neko/NekoConnection.hx index a8899cf..8ed549c 100755 --- a/src/common/haxe/ru/m/core/connect/neko/NekoConnection.hx +++ b/src/common/haxe/ru/m/core/connect/neko/NekoConnection.hx @@ -31,7 +31,7 @@ class NekoConnection extends BaseConnection { socket.output.write(bytes); socket.output.flush(); } catch (e:Dynamic) { - trace("Error send packet: " + packet); + trace("Error send packet: " + Type.getClassName(Type.getClass(packet))); trace(e); } } diff --git a/src/common/haxe/ru/m/tankz/engine/Engine.hx b/src/common/haxe/ru/m/tankz/engine/Engine.hx index 9b30ef6..fff9054 100755 --- a/src/common/haxe/ru/m/tankz/engine/Engine.hx +++ b/src/common/haxe/ru/m/tankz/engine/Engine.hx @@ -71,11 +71,11 @@ class Engine implements IEngine { case GameChangeType.APPEND: switch (change.objectType) { case GameObjectType.TANK: - var tank:Tank = buildTank(change.personId, change.objectId, change.x, change.y, Direction.from(change.directionY, change.directionY)); + var tank:Tank = buildTank(change.personId, change.objectId, change.x, change.y, Direction.from(change.directionX, change.directionY)); mobileEntities.set(tank.id, tank); tanks.set(tank.personId, tank); case GameObjectType.BULLET: - var bullet:Bullet = new Bullet(change.personId, change.objectId, change.x, change.y, 0, Direction.from(change.directionY, change.directionY)); + var bullet:Bullet = new Bullet(change.personId, change.objectId, change.x, change.y, 0, Direction.from(change.directionX, change.directionY)); mobileEntities.set(bullet.id, bullet); } case GameChangeType.DESTROED: