예제 #1
0
        public override void SetCharacterAttr()
        {
            IAttrFactory AttrFactory  = RTSFactory.GetAttrFactory();
            EnemyAttr    theEnemyAttr = AttrFactory.GetEnemyAttr(
                m_BuildParam.NewCharacter.GetAttrID());

            theEnemyAttr.SetAttrStrategy(new EnemyAttrStrategy());
            m_BuildParam.NewCharacter.SetCharacterAttr(theEnemyAttr);
        }
예제 #2
0
        // 设置角色能力
        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);
        }