コード例 #1
0
    // Start is called before the first frame update
    void Awake()
    {
        allSoundEffects = new Dictionary <SoundEffectType, AudioClip> ();

        foreach (var sound in UsedSoundEffects)
        {
            allSoundEffects.Add(sound.type, sound.audio);
        }

        if (instance == null)
        {
            instance = this;
        }
    }
コード例 #2
0
 private void Start()
 {
     SoundEffectParticlePrefab = Resources.Load <GameObject>("SoundEffectParticle");
     soundEffectsStorage       = FindObjectOfType <SoundEffectStorage>();
 }