예제 #1
0
 public void AddGraphics(Camera camera, System.Action action)
 {
     if (m_GraphicsDic.ContainsKey(camera))
     {
         camera.GetComponent <GraphicsMono>().AddGraphics(action);
     }
     else
     {
         GraphicsMono temp = camera.gameObject.AddComponent <GraphicsMono>();
         m_GraphicsDic.Add(camera, temp);
         temp.AddGraphics(action);
     }
 }
예제 #2
0
 /// <summary>
 /// 添加一个渲染任务
 /// </summary>
 /// <param name="camera"></param>
 /// <param name="paniter"></param>
 public void AddGraphics(Camera camera, IDraw paniter)
 {
     if (m_GraphicsDic.ContainsKey(camera))
     {
         m_GraphicsDic[camera].AddGraphics(paniter);
     }
     else
     {
         GraphicsMono temp = camera.gameObject.AddComponent <GraphicsMono>();
         m_GraphicsDic.Add(camera, temp);
         temp.AddGraphics(paniter);
     }
 }