Class ClipSetter
ClipSetter allows you to set the clip of an AudioSource using the filename as a string. The AudioSource being set must be a component of the same game object as the ClipSetter.
Inheritance
Namespace: Alegra.DimSums
Assembly: cs.temp.dll.dll
Syntax
public class ClipSetter : MonoBehaviour
Methods
PlayLine(ParameterList)
Sets the clip of the AudioSource to the line given by the top item of the given ParameterList, then plays the AudioSource.
Declaration
public void PlayLine(ParameterList parameterList)
Parameters
| Type | Name | Description |
|---|---|---|
| ParameterList | parameterList | Parameter list contaning filenames of lines |
PlayLine(String)
Sets the clip of the AudioSource to the line with the given filename, then plays the AudioSource.
Declaration
public void PlayLine(string clipName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | clipName | Audio clip filename - the file must be in the "Lines" folder |
SetAudioClip(AnswerEncounter)
Sets the clip of the AudioSource to the audio file given in the arguments of the AnswerEncounter.
Declaration
public void SetAudioClip(AnswerEncounter answerEncounter)
Parameters
| Type | Name | Description |
|---|---|---|
| AnswerEncounter | answerEncounter | AnswerEncounter containing an AudioResourceName argument - relative path |
SetAudioClip(String)
Sets the clip of the AudioSource to the audio file given by the filepath.
Declaration
public void SetAudioClip(string relativePath)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | relativePath | Relative filepath to the file |
SetAudioClipLine(ParameterList)
Sets the clip of the AudioSource to the line given by the top item of the given ParameterList.
Declaration
public void SetAudioClipLine(ParameterList parameterList)
Parameters
| Type | Name | Description |
|---|---|---|
| ParameterList | parameterList | Parameter list contaning filenames of lines |
SetAudioClipLine(AnswerEncounter)
Sets the clip of the AudioSource to the line given in the arguments of the AnswerEncounter.
Declaration
public void SetAudioClipLine(AnswerEncounter answerEncounter)
Parameters
| Type | Name | Description |
|---|---|---|
| AnswerEncounter | answerEncounter | Answer encounter containing an AudioResourceName argument |
SetAudioClipLine(String)
Sets the clip of the AudioSource to the line with the given filename.
Declaration
public void SetAudioClipLine(string clipName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | clipName | Audio clip filename - the file must be in the "Lines" folder |
SetAudioClipSong(AnswerEncounter)
Sets the clip of the AudioSource to the song given in the arguments of the AnswerEncounter.
Declaration
public void SetAudioClipSong(AnswerEncounter answerEncounter)
Parameters
| Type | Name | Description |
|---|---|---|
| AnswerEncounter | answerEncounter | Answer encounter containing an AudioResourceName argument |
SetAudioClipSong(String)
Sets the clip of the AudioSource to the song with the given filename.
Declaration
public void SetAudioClipSong(string clipName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | clipName | Audio clip filename - the file must be in the "Songs" folder |