public ICharacterAttr(IAttrStrategy strategy, int lv, CharactorBaseAttr baseAttr)
 {
     mLv           = lv;
     mBaseAttr     = baseAttr;
     mAttrStrategy = strategy;
     mDmgDescValue = mAttrStrategy.GetDmgDescValue(mLv);
     mCurHp        = mBaseAttr.MaxHp + mAttrStrategy.GetExtraHPValue(mLv);
 }
Example #2
0
        public override void AddCharactorAttr()
        {
            CharactorBaseAttr baseAttr = FactoryManager.AttrFactory.GetCharactorBaseAttr(mT);

            mPrefabName = baseAttr.PrefabName;
            ICharacterAttr attr = new SoldierAttr(new SoldierAttrStrategy(), mLv, baseAttr);

            mCharacter.Attr = attr;
        }
 public EnemyAttr(IAttrStrategy strategy, int lv, CharactorBaseAttr baseAttr) : base(strategy, lv, baseAttr)
 {
 }
 public SoldierAttr(IAttrStrategy strategy, int lv, CharactorBaseAttr baseAttr) : base(strategy, lv, baseAttr)
 {
 }