增加参数
This commit is contained in:
parent
fe3be446fd
commit
fca0781a41
@ -37,7 +37,8 @@ export class PlayerHandler {
|
|||||||
public init(aplayer: Player, owner: BattleHandler){
|
public init(aplayer: Player, owner: BattleHandler){
|
||||||
this._owner = owner;
|
this._owner = owner;
|
||||||
this._player = aplayer;
|
this._player = aplayer;
|
||||||
this.updateHero();
|
this._friend = null;
|
||||||
|
this.updateHero(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
public clear(){
|
public clear(){
|
||||||
@ -49,11 +50,10 @@ export class PlayerHandler {
|
|||||||
this._totalcc = 0;
|
this._totalcc = 0;
|
||||||
this._totalem = 0;
|
this._totalem = 0;
|
||||||
this._cardstate = CondType.NO_COND;
|
this._cardstate = CondType.NO_COND;
|
||||||
this._friend = null;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public updateHero(){
|
public updateHero(bclear: boolean = false){
|
||||||
this.clear();
|
bclear && this.clear();
|
||||||
this._playercfg = CfgMan.findPlayerCfg(this._player.heroId);
|
this._playercfg = CfgMan.findPlayerCfg(this._player.heroId);
|
||||||
this._self = new PetHandler();
|
this._self = new PetHandler();
|
||||||
this._self.init(null, this, 0);
|
this._self.init(null, this, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user