コード例 #1
0
        public void InitMartialArtsConfig(ref JSONObject source)
        {
            float  value       = 0;
            int    valueInt    = 0;
            string valueString = string.Empty;

            DataUtils.SetConfigValue(ref source, ref valueString, ref martialArtsName, "name");

            DataUtils.SetConfigValue(ref source, ref valueInt, ref id, "id");
            DataUtils.SetConfigValue(ref source, ref valueInt, ref type, "type");
            DataUtils.SetConfigValue(ref source, ref valueInt, ref levelMax, "level_max");
            DataUtils.SetConfigValue(ref source, ref valueInt, ref weaponType, "weapon_type");

            DataUtils.SetConfigValue(ref source, ref value, ref atk, "atk");
            DataUtils.SetConfigValue(ref source, ref value, ref def, "def");
            DataUtils.SetConfigValue(ref source, ref value, ref ingenious, "ingenious");
            DataUtils.SetConfigValue(ref source, ref value, ref gait, "gait");
            DataUtils.SetConfigValue(ref source, ref value, ref tactical, "tactical");
            DataUtils.SetConfigValue(ref source, ref value, ref qiCost, "qi_cost");
            DataUtils.SetConfigValue(ref source, ref value, ref series, "series");
            DataUtils.SetConfigValue(ref source, ref value, ref knack, "knack");
            DataUtils.SetConfigValue(ref source, ref value, ref fatal, "fatal");

            meridiansRaw = source["meridians"];
            meridians    = new KnightMeridian();
            DataUtils.SetKnightMeridian(ref meridiansRaw, ref meridians);

            attainmentsRaw = source["attainments"];
            attainments    = new KnightAttainments();
            DataUtils.SetKnightAttainments(ref attainmentsRaw, ref attainments);
        }
コード例 #2
0
        public void InitMeridianConfig(ref JSONObject source)
        {
            SetRaw(ref source);

            if (data == null)
            {
                data = new KnightMeridian();
            }

            DataUtils.SetKnightMeridian(ref source, ref data);
        }
コード例 #3
0
        public static void SetKnightMeridian(ref JSONObject source, ref KnightMeridian target)
        {
            float value = 0;

            SetConfigValue(ref source, ref value, ref target.meridian, "meridian");
            SetConfigValue(ref source, ref value, ref target.meridianYin, "yin");
            SetConfigValue(ref source, ref value, ref target.meridianYang, "yang");
            SetConfigValue(ref source, ref value, ref target.meridianHard, "hard");
            SetConfigValue(ref source, ref value, ref target.meridianSoft, "soft");
            SetConfigValue(ref source, ref value, ref target.meridianToxin, "toxin");
        }