Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SoundProps : MonoBehaviour {
public static Dictionary<string, float[]> props = new Dictionary<string, float[]>();
private void Awake()
{
buildSoundProp("cgPong", 0.3f);
buildSoundProp("brassbowl", 0.5f);
buildSoundProp("crotale", 1.0f);
buildSoundProp("gran", 0.3f);
buildSoundProp("choir", 0.5f);
buildSoundProp("chords", 1.0f);
buildSoundProp("muted_bass", 0.3f);
buildSoundProp("chime", 0.5f);
buildSoundProp("mk", 1.0f);
}
private void buildSoundProp(string name, float volume)
{
float[] tempArray = new float[4];
tempArray[0] = volume;
props.Add(name, tempArray);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment