This commit is contained in:
2015-08-14 16:46:29 +03:00
parent 3643be4cd8
commit 2099171d33
8 changed files with 4 additions and 22 deletions

View File

@@ -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);
}
}

View File

@@ -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: