Exemplo n.º 1
0
        public override IScriptableItem Copy()
        {
            IScriptableItem config = base.Copy();

            KnightMeridianConfig target = config as KnightMeridianConfig;

            target.InitMeridianConfig(ref mRawJSON);
            target.data.meridian      = data.meridian;
            target.data.meridianYin   = data.meridianYin;
            target.data.meridianYang  = data.meridianYang;
            target.data.meridianHard  = data.meridianHard;
            target.data.meridianSoft  = data.meridianSoft;
            target.data.meridianToxin = data.meridianToxin;

            return(config);
        }
Exemplo n.º 2
0
        override public void InitModel(ref JSONObject source)
        {
            base.InitModel(ref source);

            if (!mIsPlayer)
            {
                mBaseConfig     = ScriptableObject.CreateInstance <KnightBaseConfig>();
                mMeridianConfig = ScriptableObject.CreateInstance <KnightMeridianConfig>();
                mBattleConfig   = ScriptableObject.CreateInstance <KnightBattleConfig>();

                mBaseConfig.InitBaseConfig(ref source);
                mMeridianConfig.InitMeridianConfig(ref source);
                mBattleConfig.InitBattleConfig(ref source);

                mNameID = -1;
                mName   = mBaseConfig.firstName.Append(ref mSbd, mBaseConfig.secendName);
            }
        }