public override void setData(Dictionary <string, object> data) { this.uid = data["uid"].ToString(); if (this.uid == ((ClientRunTime)this._map).uid) { ((ClientRunTime)this._map).localPlayer = (ClientPlayerEntity)this; } this.cardGroup = (CardGroupAction)this._map.getNetObject((int)(data["cardGroup"])); this.partGroup = (PartGroupAction)this._map.getNetObject((int)(data["partGroup"])); this.shipId = data["shipId"].ToString(); this.index = (int)(data["index"]); this.name = data["name"].ToString(); if (data.ContainsKey("reviveAction")) { this.reviveAction = (TimeAction)this._map.getNetObject((int)(data["reviveAction"])); this.reviveAction.callBack = this.revive; } this.teamIndex = (int)(data["teamIndex"]); this.calls = new List <object>((object[])data["calls"]).ConvertAll <CallEntity>((object netId) => { return((CallEntity)this._map.getNetObject((int)(netId))); }); this.fightResult = (FightResult)this._map.getNetObject((int)(data["fightResult"])); this._attractShape = (GeomBase)this._map.getNetObject((int)(data["attractShape"])); this.headUrl = data["headUrl"].ToString(); base.setData(data); }
public override void initConfig(Dictionary <string, object> data = null) { this.teamIndex = (int)(data["teamIndex"]); this.shipId = data["shipId"].ToString(); this.uid = data["uid"].ToString(); this.name = null == data["name"] ? this.uid : data["name"].ToString(); this.level = 1; //(data["level"]==null)?1:(int)data["level"]; this.ownerPlayer = this; this.id = "player"; this.headUrl = this.uid.IndexOf("-") == 0 ? this.name : data["head"] == null ? "" : ((Dictionary <string, object>)data["head"])["use"].ToString(); this.fightResult = new FightResult(this._map); this.fightResult.init(); this.cardGroup = new CardGroupAction(this._map); this.partGroup = new PartGroupAction(this._map); this.cardGroup.ids = new List <object>((object[])data["cardGroup"]).ConvertAll <Dictionary <string, object> >((object obj) => { return((Dictionary <string, object>)obj); }); this.cardGroup.init(this); this.partGroup.init(this); base.initConfig((Dictionary <string, object>)DataManager.inst.beckon[this.id]); this._attractShape = Collision.createGeom(this, new object[] { (int)this.getProperty(ConfigConstant.PROPERTY_ATTRACT) }); this.actionManager.addAction(this.cardGroup); this.actionManager.addAction(this.partGroup); this.updateLevel(); }
public AssessPart(AssessPlayer assessPlayer) : base(assessPlayer) { this._partGroup = this._assessPlayer.targetPlayer.partGroup; }