Refactor
This commit is contained in:
parent
b774357807
commit
57d7009342
39 changed files with 203 additions and 250 deletions
|
|
@ -11,12 +11,12 @@ import {
|
|||
} from 'shared';
|
||||
import { Game } from '../game';
|
||||
import { Camera } from './camera';
|
||||
import { PlayerCharacterView } from './player-character-view';
|
||||
import { CharacterView } from './character-view';
|
||||
import { ViewObject } from './view-object';
|
||||
|
||||
export class GameObjectContainer extends CommandReceiver {
|
||||
protected objects: Map<Id, ViewObject> = new Map();
|
||||
public player!: PlayerCharacterView;
|
||||
public player!: CharacterView;
|
||||
public camera!: Camera;
|
||||
|
||||
protected commandExecutors: CommandExecutors = {
|
||||
|
|
@ -25,7 +25,7 @@ export class GameObjectContainer extends CommandReceiver {
|
|||
this.deleteObject(this.camera.id);
|
||||
}
|
||||
|
||||
this.player = c.character as PlayerCharacterView;
|
||||
this.player = c.character as CharacterView;
|
||||
this.player.isMainCharacter = true;
|
||||
|
||||
this.camera = new Camera(this.game);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue