コード例 #1
0
 public HxDummyLight DummyLightSafe()
 {
     if (myDummyLight == null)
     {
         myDummyLight = GetComponent <HxDummyLight>();
     }
     return(myDummyLight);
 }
コード例 #2
0
    void OnEnable()
    {
        myLight      = GetComponent <Light>();
        myDummyLight = GetComponent <HxDummyLight>();


        HxVolumetricCamera.AllVolumetricLight.Add(this);
        UpdatePosition(true);

        if (GetLightType() != LightType.Directional)
        {
            octreeNode = HxVolumetricCamera.AddLightOctree(this, minBounds, maxBounds);
        }
        else
        {
            HxVolumetricCamera.ActiveDirectionalLights.Add(this);
        }

        //if (!HasLight())
        //{
        //    enabled = false;
        //}
    }
コード例 #3
0
    bool LightEnabled()
    {
        if (myLight != null)
        {
            return(myLight.enabled);
        }
        if (myDummyLight != null)
        {
            return(myDummyLight.enabled);
        }

        myLight = GetComponent <Light>();
        if (myLight != null)
        {
            return(myLight.enabled);
        }
        myDummyLight = GetComponent <HxDummyLight>();
        if (myDummyLight != null)
        {
            return(myDummyLight.enabled);
        }

        return(false);
    }
コード例 #4
0
 void Start()
 {
     myLight      = GetComponent <Light>();
     myDummyLight = GetComponent <HxDummyLight>();
 }