Esempio n. 1
0
    public override void SetCharacterAttr()
    {
        IAttrFactory theAttrFactory = GameFactory.GetAttrFactory();
        int          AttrID         = m_BuildParam.NewCharacter.GetAttrID();
        EnemyAttr    theEnemyAttr   = theAttrFactory.GetEnemyAttr(AttrID);

        theEnemyAttr.SetAttStrategy(new EnemyAttrStrategy());



        m_BuildParam.NewCharacter.SetCharacterAttr(theEnemyAttr);
    }
    // 设定角色能力
    public override void SetCharacterAttr()
    {
        // 取得Enemy的数值
        IAttrFactory theAttrFactory = PBDFactory.GetAttrFactory();
        int          AttrID         = m_BuildParam.NewCharacter.GetAttrID();
        EnemyAttr    theEnemyAttr   = theAttrFactory.GetEnemyAttr(AttrID);

        // 设定数值的计算策略
        theEnemyAttr.SetAttStrategy(new EnemyAttrStrategy());

        // 设定给角色
        m_BuildParam.NewCharacter.SetCharacterAttr(theEnemyAttr);
    }