Пример #1
0
        public override void ParseDefinition(string definitionKey, JsonData jsonData)
        {
            this.definitionKey = definitionKey;

            var keys = jsonData.Keys;

            portraitKey = ContentHelper.ParseString(jsonData, D.PORTRAITKEY, "Portrait_1");
            voiceVolume = ContentHelper.ParseFloat(jsonData, "voiceVolume", 1.0f);

            this.name       = ContentHelper.ParseString(jsonData, D.NAME, definitionKey);
            this.factionKey = ContentHelper.ParseString(jsonData, D.FACTION_KEY, "FACTION_GUARDS");


            if (keys.Contains(D.REWARDS_ON_START))
            {
                this._onStartRewardDefinitions = EffectDefinition.ParseDefinitions(jsonData[D.REWARDS_ON_START], definitionKey);
            }
            else
            {
                this._onStartRewardDefinitions = new Definition <Effect> [0];
            }

            this.voiceType = ContentHelper.ParseString(jsonData, "voiceKey", "A");

            if (keys.Contains(D.REWARDS_ON_TUNE))
            {
                this._onTuneInRewardDefinitions = EffectDefinition.ParseDefinitions(jsonData[D.REWARDS_ON_TUNE], definitionKey);
            }
            else
            {
                this._onTuneInRewardDefinitions = new Definition <Effect> [0];
            }
        }
Пример #2
0
        public override void ParseDefinition(string definitionKey, JsonData jsonData)
        {
            this.definitionKey = definitionKey;

            var keys = jsonData.Keys;

            this.name         = ContentHelper.ParseString(jsonData, D.NAME, definitionKey);
            this.memberName   = ContentHelper.ParseString(jsonData, "member", definitionKey);
            this.rivalFaction = ContentHelper.ParseString(jsonData, "rivalFaction", definitionKey);


            this.startingReputation = ContentHelper.ParseInt(jsonData, D.STARTING_REPUTATION, 50);
        }