Exemple #1
0
        // IDialogueEditing
        public void Initialize(TextEffectParams effectParams)
        {
            Assert.IsTrue(effectParams.EffectType == TextEffectType.Animation_Wobble);

            _range = effectParams.Range;
            Dictionary <string, string> attributes = effectParams.Attributes;

            if (attributes.ContainsKey(TextEffectsAttributes.Frequency1Attribute))
            {
                _frequency1 = Tools.StringToFloat(effectParams.Attributes[TextEffectsAttributes.Frequency1Attribute]);
            }
            Assert.IsTrue(_frequency1 >= 0);

            if (attributes.ContainsKey(TextEffectsAttributes.Frequency2Attribute))
            {
                _frequency2 = Tools.StringToFloat(effectParams.Attributes[TextEffectsAttributes.Frequency2Attribute]);
            }
            Assert.IsTrue(_frequency2 >= 0);

            if (attributes.ContainsKey(TextEffectsAttributes.AmplitudeAttribute))
            {
                _amplitude = Tools.StringToFloat(effectParams.Attributes[TextEffectsAttributes.AmplitudeAttribute]);
            }
            Assert.IsTrue(_amplitude >= 0);

            if (attributes.ContainsKey(TextEffectsAttributes.CoverageAttribute))
            {
                Assert.IsTrue(Tools.StringToEnum(attributes[TextEffectsAttributes.CoverageAttribute], ref _coverage));
            }
        }