public SoundEffectPlayer(string name, bool loop, SoundEffectCreater creater) { source = creater.SpawnSource(name, loop); this.creater = creater; this.volume = source.volume; this.isPlaying = false; }
public SoundEffectCreater this[string name] { get { SoundEffectCreater creater; if (!createrDic.TryGetValue(name, out creater)) { creater = new SoundEffectCreater(); creater.name = name; creater.root = transform; creater.Init(); createrDic[name] = creater; } return(creater); } }