Exemplo n.º 1
0
 public void PlaySound(SapientCalls.Call sound)
 {
     if (sound != null && Find.CameraDriver.CurrentViewRect.ExpandedBy(10).Contains(Pawn.Position))
     {
         SoundInfo info = SoundInfo.InMap(new TargetInfo(Pawn.PositionHeld, Pawn.MapHeld));
         Rand.PushState();
         sound.sound.PlayOneShot(info);
         Rand.PopState();
     }
 }
Exemplo n.º 2
0
 public SoundTrigger(SapientCalls.Call call, Func <bool, bool> trigger = null)
 {
     this.trigger = trigger;
     this.call    = call;
 }