Example #1
0
 private void Update()
 {
     // If we have some splat data to render, create a command
     // buffer for it and give it to the GoreManager to do the
     // rendering.
     if (splatsToRender.Count > 0)
     {
         List <Splatter.QueuedSplat> renderedSplats;
         CommandBuffer buffer = splatter.TryRenderSplats(splatsToRender, out renderedSplats);
         if (renderedSplats.Count > 0)
         {
             GoreManager.Instance.AddBloodBuffer(buffer);
             foreach (Splatter.QueuedSplat splat in renderedSplats)
             {
                 if (splat.splatData.HasMoreFrames(splat.frame + 1))
                 {
                     StartCoroutine(DelayFrame(splat));
                 }
             }
         }
     }
 }