refac: 값 정리
This commit is contained in:
@@ -7,6 +7,7 @@ import { must } from "@sammo/util";
|
||||
import { Nation } from "./Nation.js";
|
||||
import { Troop } from "./Troop.js";
|
||||
import { LazyEntityUpdater } from "./LazyEntityUpdater.js";
|
||||
import type { IAction, IActionKey } from "./IAction.js";
|
||||
|
||||
export class General extends LazyEntityUpdater<IGeneralEntity> {
|
||||
protected readonly _indirectNames: (keyof IGeneralEntity)[] = ["id", "nationID", "troopID", "nationID"];
|
||||
@@ -17,6 +18,8 @@ export class General extends LazyEntityUpdater<IGeneralEntity> {
|
||||
protected _troop: WeakRef<Troop> | undefined;
|
||||
protected _nation: WeakRef<Nation>;
|
||||
|
||||
protected readonly iActionHandlers: Map<IActionKey, IAction>;
|
||||
|
||||
constructor(
|
||||
raw: IGeneralEntity,
|
||||
protected readonly resourceController: IResourceController
|
||||
@@ -29,6 +32,9 @@ export class General extends LazyEntityUpdater<IGeneralEntity> {
|
||||
if(raw.troopID){
|
||||
this._troop = new WeakRef(must(resourceController.troop(raw.troopID, raw.nationID)));
|
||||
}
|
||||
|
||||
//TODO: iAction 처리해야함
|
||||
this.iActionHandlers = new Map();
|
||||
}
|
||||
|
||||
public get id(): GeneralID {
|
||||
|
||||
Reference in New Issue
Block a user