示例#1
0
 public SoundEffectPlayer(string name, bool loop, SoundEffectCreater creater)
 {
     source         = creater.SpawnSource(name, loop);
     this.creater   = creater;
     this.volume    = source.volume;
     this.isPlaying = false;
 }
示例#2
0
 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);
     }
 }