public BurstAudioSource Deploy() { return(new GameObject().AddComponent <BurstAudioSource>().Chain(s => s.Initialize( audio, RandFloat.GetVariance(volume, volume_variance), RandFloat.GetVariance(pitch, pitch_variance) ))); }
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)); }