Added Tank speed constants
This commit is contained in:
parent
93ea3efdac
commit
878bac1f4f
@ -10,7 +10,7 @@ export class Tank {
|
|||||||
this.x = x;
|
this.x = x;
|
||||||
this.y = y;
|
this.y = y;
|
||||||
this.collisionManager = collisionManager;
|
this.collisionManager = collisionManager;
|
||||||
this.speed = 3.0;
|
this.speed = Constants.TANK_SPEED.getValue();
|
||||||
this.direction = DirectionEnum.Up;
|
this.direction = DirectionEnum.Up;
|
||||||
|
|
||||||
this.isDestroyed = false;
|
this.isDestroyed = false;
|
||||||
|
|||||||
@ -2,6 +2,7 @@ export class Constants {
|
|||||||
static TILE_SIZE = new Constants(32);
|
static TILE_SIZE = new Constants(32);
|
||||||
static TANK_SIZE = new Constants(24);
|
static TANK_SIZE = new Constants(24);
|
||||||
static TANK_COLL_OFFSET = new Constants(0.05);
|
static TANK_COLL_OFFSET = new Constants(0.05);
|
||||||
|
static TANK_SPEED = new Constants(2.0);
|
||||||
static SHOT_SPEED = new Constants(2.0);
|
static SHOT_SPEED = new Constants(2.0);
|
||||||
static SHOT_SIZE = new Constants(5);
|
static SHOT_SIZE = new Constants(5);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user