public override void SetBuildingAttr() { IAttrFactory Factroy = PBDGFactory.GetAttrFactory(); int attrID = m_buildParam.AttrID; SoldierAttr soldierAttr = Factroy.GetSoldierAttr(attrID); m_buildParam.NewBuding.SetAttr(soldierAttr); }
public override void SetCharacterAttr() { // 取得Enemy的數值 IAttrFactory theAttrFactory = PBDFactory.GetAttrFactory(); int AttrID = m_BuildParam.NewCharacter.GetAttrID(); SoldierAttr theSoldierAttr = theAttrFactory.GetSoldierAttr(AttrID); // 設定數值的計算策略 theSoldierAttr.SetAttStrategy(new SoldierAttrStrategy()); // 設定給角色 m_BuildParam.NewCharacter.SetCharacterAttr(theSoldierAttr); }
// 设定角色能力 public override void SetCharacterAttr() { // 取得Soldier的数值 IAttrFactory theAttrFactory = PBDFactory.GetAttrFactory(); int AttrID = m_BuildParam.NewCharacter.GetAttrID(); SoldierAttr theSoldierAttr = theAttrFactory.GetSoldierAttr(AttrID); // 设定 theSoldierAttr.SetAttStrategy(new SoldierAttrStrategy()); // 设定等级 theSoldierAttr.SetSoldierLv(m_BuildParam.Lv); // 设定给角色 m_BuildParam.NewCharacter.SetCharacterAttr(theSoldierAttr); }
// 设置角色能力 public override void SetCharacterAttr() { // 获取Soldier的属性 IAttrFactory theAttrFactory = RTSFactory.GetAttrFactory(); SoldierAttr theSoldierAttr = theAttrFactory.GetSoldierAttr( m_BuildParam.NewCharacter.GetAttrID()); // 设置 theSoldierAttr.SetAttrStrategy(new SoldierAttrStrategy()); // 设置等级 theSoldierAttr.SetSoldierLv(m_BuildParam.Lv); // 设置给角色 m_BuildParam.NewCharacter.SetCharacterAttr(theSoldierAttr); }
/// <summary> /// 设置角色属性 /// </summary> public override void SetCharacterAttr() { IAttrFactory theAttrFactory = GameFactory.GetAttrFactory(); int AttrID = m_BuildParam.NewCharacter.GetAttrID(); SoldierAttr theSoldierAttr = theAttrFactory.GetSoldierAttr(AttrID); //m_BuildParam.NewCharacter.SetCharacterAttr(theSoldierAttr); theSoldierAttr.SetAttStrategy(new SoldierAttrStrategy()); theSoldierAttr.SetSoldierLv(m_BuildParam.Lv); m_BuildParam.NewCharacter.SetCharacterAttr(theSoldierAttr); }