Show / Hide Table of Contents

Class CurveSampleProvider

This is an implementation of a sample provider that provides samples based on Unity's AnimationCurve class.

Inheritance
System.Object
UnityEngine.Object
UnityEngine.ScriptableObject
CurveSampleProvider
Implements
ISampleProvider
Namespace: InsaneScatterbrain.RetroKit.Editor
Syntax
public class CurveSampleProvider : ScriptableObject, ISampleProvider

Properties

Curve

Declaration
public AnimationCurve Curve { get; set; }
Property Value
Type Description
UnityEngine.AnimationCurve

Name

Declaration
public string Name { get; }
Property Value
Type Description
System.String

Methods

Create(String, CurveSampleProvider)

Creates a copy of the given curve sample provider.

Declaration
public static CurveSampleProvider Create(string name, CurveSampleProvider existingCurveSampleProvider)
Parameters
Type Name Description
System.String name
CurveSampleProvider existingCurveSampleProvider
Returns
Type Description
CurveSampleProvider

Create(String, AnimationCurve)

Creates a new curve sample provider.

Declaration
public static CurveSampleProvider Create(string name, AnimationCurve curve)
Parameters
Type Name Description
System.String name

The name.

UnityEngine.AnimationCurve curve

The curve.

Returns
Type Description
CurveSampleProvider

The curve sample provider.

GetSamples(SoundEffect)

Declaration
public float[] GetSamples(SoundEffect soundEffect)
Parameters
Type Name Description
SoundEffect soundEffect
Returns
Type Description
System.Single[]

GetSamples(Single, Single, Single, Int32)

Declaration
public float[] GetSamples(float pitch, float volume, float duration, int toneIndex = 0)
Parameters
Type Name Description
System.Single pitch
System.Single volume
System.Single duration
System.Int32 toneIndex
Returns
Type Description
System.Single[]

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
UnityEngine.Object.ToString()

Implements

ISampleProvider
Back to top Generated by DocFX