예제 #1
0
 public void SetRelativeByConfig(AttributeConfig attr)
 {
     SetStrength(Operate_Type.OT_Relative, attr.GetStrength(Strength, 0));
     SetStrengthRate(Operate_Type.OT_Relative, attr.GetStrengthRate(StrengthRate, 0));
     SetIntelligence(Operate_Type.OT_Relative, attr.GetIntelligence(Intelligence, 0));
     SetIntelligenceRate(Operate_Type.OT_Relative, attr.GetIntelligenceRate(IntelligenceRate, 0));
     SetCharm(Operate_Type.OT_Relative, attr.GetCharm(Charm, 0));
     SetCharmRate(Operate_Type.OT_Relative, attr.GetCharmRate(CharmRate, 0));
     SetAction(Operate_Type.OT_Relative, attr.GetAction(Action, 0));
     SetActionMax(Operate_Type.OT_Relative, attr.GetActionMax(ActionMax, 0));
     SetGold(Operate_Type.OT_Relative, attr.GetGold(Gold, 0));
 }
예제 #2
0
        //------------------------------------------------------------------------
        // 属性初始化接口
        //------------------------------------------------------------------------
        public void SetAbsoluteByConfig(AttributeConfig attr)
        {
            float aStrength         = attr.GetStrength(0, 0);
            float aStrengthRate     = attr.GetStrengthRate(0, 0);
            float aIntelligence     = attr.GetIntelligence(0, 0);
            float aIntelligenceRate = attr.GetIntelligenceRate(0, 0);
            float aCharm            = attr.GetCharm(0, 0);
            float aCharmRate        = attr.GetCharmRate(0, 0);
            float aAction           = attr.GetAction(0, 0);
            float aActionMax        = attr.GetActionMax(0, 0);
            float aGold             = attr.GetGold(0, 0);

            SetStrength(Operate_Type.OT_Absolute, aStrength);
            SetStrengthRate(Operate_Type.OT_Absolute, aStrengthRate);
            SetIntelligence(Operate_Type.OT_Absolute, aIntelligence);
            SetIntelligenceRate(Operate_Type.OT_Absolute, aIntelligenceRate);
            SetCharm(Operate_Type.OT_Absolute, aCharm);
            SetCharmRate(Operate_Type.OT_Absolute, aCharmRate);
            SetAction(Operate_Type.OT_Absolute, aAction);
            SetActionMax(Operate_Type.OT_Absolute, aActionMax);
            SetGold(Operate_Type.OT_Absolute, aGold);
        }