Added Tank speed constants

This commit is contained in:
Nikita Iryupin 2021-06-05 14:19:44 +02:00
parent 93ea3efdac
commit 878bac1f4f
2 changed files with 2 additions and 1 deletions

View File

@ -10,7 +10,7 @@ export class Tank {
this.x = x;
this.y = y;
this.collisionManager = collisionManager;
this.speed = 3.0;
this.speed = Constants.TANK_SPEED.getValue();
this.direction = DirectionEnum.Up;
this.isDestroyed = false;

View File

@ -2,6 +2,7 @@ export class Constants {
static TILE_SIZE = new Constants(32);
static TANK_SIZE = new Constants(24);
static TANK_COLL_OFFSET = new Constants(0.05);
static TANK_SPEED = new Constants(2.0);
static SHOT_SPEED = new Constants(2.0);
static SHOT_SIZE = new Constants(5);