public override void BuildAttribute() { //1、实例化数值属性 CharacterAttribute attribute = new SoldierAttribute(FactoryManger.AttributeFactory.GetCharShareAttribute(base.CharacterType), base.Lv); base.Character.Attribute = attribute; }
public override void AddCharacterAttr() { CharacterBaseAttr baseAttr = FactoryManager.attrFactory.GetCharacterBaseAttr(mType); mPrefabName = baseAttr.prefabName; ICharacterAttribute attr = new SoldierAttribute(new SoldierAttrStrategy(), mLevel, baseAttr); mCharacter.Attr = attr; }
public SoldierCaptive(IEnemy enemy) { mEnemy = enemy; ICharacterAttribute attr = new SoldierAttribute(enemy.Attr.strategy, 1, enemy.Attr.baseAttr); this.Attr = attr; this.gameObject = mEnemy.gameObject; this.weapon = mEnemy.weapon; }