private void ChangeLights(LightsType lightTypes) { Destroy (curLightObject); m_Lights = null; switch (lightTypes) { case LightsType.Directional: curLightType = LightsType.Directional; curLightObject = Instantiate(DirectionalLight); curLightObject.transform.position = new Vector3 (0, 1.8f, 0); break; case LightsType.Point: curLightType = LightsType.Point; curLightObject = Instantiate(PointLights); break; case LightsType.Spot: curLightType = LightsType.Spot; curLightObject = Instantiate(SpotLights); break; } m_Lights = curLightObject.GetComponentsInChildren<Light>(); if (m_ColorPicker) { m_ColorPicker.SetCurrentColor (); m_ColorPicker.SetCurrentIntensity(); } }
private void ChangeLights(LightsType lightTypes) { Destroy(curLightObject); m_Lights = null; switch (lightTypes) { case LightsType.Directional: curLightType = LightsType.Directional; curLightObject = Instantiate(DirectionalLight); curLightObject.transform.position = new Vector3(0, 1.8f, 0); break; case LightsType.Point: curLightType = LightsType.Point; curLightObject = Instantiate(PointLights); break; case LightsType.Spot: curLightType = LightsType.Spot; curLightObject = Instantiate(SpotLights); break; } m_Lights = curLightObject.GetComponentsInChildren <Light>(); if (m_ColorPicker) { m_ColorPicker.SetCurrentColor(); m_ColorPicker.SetCurrentIntensity(); } }
public static bool LightsAnimation_Load(byte[] buf, int pad, LightsType type, out string error) { if (!DLLAvailable()) { error = "SMX.DLL not available"; return(false); } error = ""; IntPtr error_pointer; bool result = SMX_LightsAnimation_Load(buf, buf.Length, pad, (int)type, out error_pointer); if (!result) { // SMX_LightsAnimation_Load takes a char **error, which is set to the error // string. error = Marshal.PtrToStringAnsi(error_pointer); } return(result); }