コード例 #1
0
        public override void SetDefaultValues(BehaviorDefaultValues data)
        {
            weightMult = 1;
            timeSpeed  = 1;

            uniformEffectTime = 0;
            weight            = 0;
            isOnOneCharacter  = false;

            enabled = false;


            void AssignValues(PresetBehaviorValues result)
            {
                float showDuration = 0;

                emissionControl = result.emission;

                enabled = PresetAppearance.SetPreset(
                    false,
                    result,
                    ref movement,
                    ref showDuration,
                    ref rotation,
                    ref scale,
                    ref rotationQua,
                    ref hasTransformEffects,
                    ref setColor,
                    ref colorCurve);

                emissionControl.Initialize(showDuration);
            }

            PresetBehaviorValues values;

            //searches for local presets first, which override global presets
            if (TAnimBuilder.GetPresetFromArray(effectTag, data.presets, out values))
            {
                AssignValues(values);
                return;
            }

            //global presets
            if (TAnimBuilder.TryGetGlobalPresetBehavior(effectTag, out values))
            {
                AssignValues(values);
                return;
            }
        }
コード例 #2
0
 public override void Initialize(bool isAppearance)
 {
     base.Initialize(isAppearance);
     emission.Initialize(GetMaxDuration());
 }
コード例 #3
0
 public override void Initialize()
 {
     base.Initialize();
     emission.Initialize(GetMaxDuration());
 }