Switching to definitely assigned parameters
This allows us to go in "full strict mode" (yeah!) See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html#strict-class-initialization
This commit is contained in:
parent
c6298b2a89
commit
24fb605f50
10 changed files with 55 additions and 58 deletions
|
@ -13,8 +13,8 @@ export interface CurrentGamerInterface extends Character{
|
|||
|
||||
export class Player extends Character implements CurrentGamerInterface {
|
||||
userInputManager: UserInputManager;
|
||||
previousDirection: string;
|
||||
wasMoving: boolean;
|
||||
previousDirection: string = PlayerAnimationNames.WalkDown;
|
||||
wasMoving: boolean = false;
|
||||
|
||||
constructor(
|
||||
Scene: GameScene,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue