Example #1
0
 public BurstAudioSource Deploy()
 {
     return(new GameObject().AddComponent <BurstAudioSource>().Chain(s => s.Initialize(
                                                                         audio,
                                                                         RandFloat.GetVariance(volume, volume_variance),
                                                                         RandFloat.GetVariance(pitch, pitch_variance)
                                                                         )));
 }
Example #2
0
        protected override float Execute(float time, float delta)
        {
            if (drift_timer.Repeat())
            {
                time_multiplier = RandFloat.GetVariance(1.0f, drift);
                drift_timer.RestartSetDurationInSeconds(RandFloat.GetBetween(0.100f, 0.250f));
            }

            float drifted_delta = time_multiplier * delta;

            drifted_time += drifted_delta;
            return(ExecuteDrifted(drifted_time, drifted_delta));
        }