|
@@ -196,22 +196,22 @@ class UserGameModel extends Object_ext {
|
|
|
* @param type $arg
|
|
|
*/
|
|
|
public function __construct($arg = null) {
|
|
|
- if (null === $arg) { # 未传参数的情况下
|
|
|
- $this->buildings = ObjectInit(); # 建筑数据
|
|
|
- $this->heros = new UserGameHeroModel(); # 英雄数据
|
|
|
- $this->heros->InitializeHero(); # 添加初始英雄
|
|
|
- $this->store = new StoreModel(); # 背包数据
|
|
|
- $this->store->initialize(); # 添加默认物品
|
|
|
- $this->privateState = new PrivateStateModel(); # 私有字段
|
|
|
- $this->privateState->initialize(); # 初始化默认数据
|
|
|
- $this->gates = new UserGateDifficulty(); # 初始化关卡默认数据
|
|
|
- $this->heroManual = new HeroManualModel(); # 初始化图鉴数据结构
|
|
|
- $this->NewbieGuide = ObjectInit(); # 初始化新手引导结构
|
|
|
- $this->pvp = new UserPVPModel(); # 初始化pvp模块
|
|
|
- } else { # 实参
|
|
|
- parent::__construct($arg); # 调用Object的构造函数
|
|
|
+ if (null === $arg) { # 未传参数的情况下
|
|
|
+ $this->buildings = ObjectInit(); # 建筑数据
|
|
|
+ $this->heros = new UserGameHeroModel(); # 英雄数据
|
|
|
+ $this->heros->InitializeHero(); # 添加初始英雄
|
|
|
+ $this->store = new StoreModel(); # 背包数据
|
|
|
+ $this->store->initialize(); # 添加默认物品
|
|
|
+ $this->privateState = new PrivateStateModel(); # 私有字段
|
|
|
+ $this->privateState->initialize(); # 初始化默认数据
|
|
|
+ $this->gates = new UserGateDifficulty(); # 初始化关卡默认数据
|
|
|
+ $this->heroManual = new HeroManualModel(); # 初始化图鉴数据结构
|
|
|
+ $this->NewbieGuide = ObjectInit(); # 初始化新手引导结构
|
|
|
+ $this->pvp = new UserPVPModel(); # 初始化pvp模块
|
|
|
+ } else { # 实参
|
|
|
+ parent::__construct($arg); # 调用Object的构造函数
|
|
|
}
|
|
|
- $this->profile = new UserProfile(); # 初始化用户画像模块
|
|
|
+ $this->profile = new UserProfile(); # 初始化用户画像模块
|
|
|
}
|
|
|
|
|
|
// <editor-fold defaultstate="collapsed" desc=" functions ">
|