improve chat

This commit is contained in:
Asraelite 2016-03-28 13:16:38 +01:00
parent 2ae3d43354
commit 61ae57a850
14 changed files with 306 additions and 33 deletions

View file

@ -7,7 +7,11 @@ class Mount {
this.ship = ship;
this.type = data.type || 'turret';
this.fixture = false; // TODO: Create fixture.
this.fixture = false;
this.position = {
x: data.pos[0],
y: data.pos[1]
}
this.traversal = data.traversal ? {
cw: data.bounds[0],
@ -22,7 +26,7 @@ class Mount {
packFull() {
return {
}
}
}

View file

@ -52,7 +52,7 @@ class Physics {
bodyDef.angularVelocity = body.rvel || 0;
bodyDef.bullet = body.type == 'missile';
bodyDef.linearDamping = body.type == 'asteroid' ? 0.003 : 0.01;
bodyDef.angularDamping = body.type == 'asteroid' ? 0.003 : 0.04;
bodyDef.angularDamping = body.type == 'asteroid' ? 0.003 : 0.06;
bodyDef.type = body.type == 'structure' ?
Box2D.b2BodyType.b2_staticBody : Box2D.b2BodyType.b2_dynamicBody;
if (body.player || true) bodyDef.allowSleep = false;

View file

@ -5,7 +5,7 @@
"power": {
"forward": 0.015,
"back": 0,
"rotation": 0.003
"rotation": 0.004
},
"frame": [
[
@ -21,6 +21,19 @@
{
"pos": [18, 4],
"type": "fixed",
"size": 0,
"traversal": false
},
{
"pos": [18, 28],
"type": "fixed",
"size": 0,
"traversal": false
},
{
"pos": [1, 16],
"type": "fixed",
"size": 1,
"traversal": false
}
]