Esempio n. 1
0
 public void callBackOnChange(UnityAction <RayTracedLight> action)
 {
     if (m_onLightChange == null)
     {
         m_onLightChange = new UnityEventRayTracerLight();
     }
     m_onLightChange.AddListener(action);
 }
Esempio n. 2
0
 // Start is called before the first frame update
 void Start()
 {
     if (m_onLightChange == null)
     {
         m_onLightChange = new UnityEventRayTracerLight();
     }
     m_currentRayCount = m_rayCount;
     m_spriteRend      = this.gameObject.GetComponent <SpriteRenderer>();
     if (m_useSpriteRendColor)
     {
         m_color = m_spriteRend.color;
     }
     m_rays          = new List <Ray>();
     m_previousColor = new Color(m_color.r, m_color.g, m_color.b, m_color.a);
     init();
     m_tracer.register(this);
     m_startingUp = false;
 }