92 lines
1.9 KiB
C#
92 lines
1.9 KiB
C#
using UnityEngine;
|
|
|
|
namespace Artngame.GIPROXY
|
|
{
|
|
public class ControlGIPROXY : MonoBehaviour
|
|
{
|
|
private LightCollisionsPDM GI_PROXY_script;
|
|
|
|
public GameObject LightPOOL;
|
|
|
|
private void Start()
|
|
{
|
|
GI_PROXY_script = base.gameObject.GetComponent(typeof(LightCollisionsPDM)) as LightCollisionsPDM;
|
|
}
|
|
|
|
private void OnGUI()
|
|
{
|
|
if (!(GI_PROXY_script != null))
|
|
{
|
|
return;
|
|
}
|
|
string text = "Toggle GI on";
|
|
if (GI_PROXY_script.enabled)
|
|
{
|
|
text = "Toggle GI off - " + GI_PROXY_script.Lights.Count + " Lights";
|
|
}
|
|
if (GUI.Button(new Rect(200f, 10f, 200f, 80f), text))
|
|
{
|
|
if (GI_PROXY_script.enabled)
|
|
{
|
|
GI_PROXY_script.enabled = false;
|
|
LightPOOL.SetActive(value: false);
|
|
}
|
|
else
|
|
{
|
|
GI_PROXY_script.enabled = true;
|
|
LightPOOL.SetActive(value: true);
|
|
}
|
|
}
|
|
string text2 = "high";
|
|
if (GI_PROXY_script.Degrade_speed == 0.135f)
|
|
{
|
|
text2 = "low";
|
|
}
|
|
if (GUI.Button(new Rect(200f, 180f, 200f, 80f), "Toggle GI power " + text2))
|
|
{
|
|
for (int i = 0; i < GI_PROXY_script.Lights.Count; i++)
|
|
{
|
|
Object.Destroy(GI_PROXY_script.Lights[i].gameObject);
|
|
}
|
|
GI_PROXY_script.Lights.Clear();
|
|
if (GI_PROXY_script.Degrade_speed == 0.035f)
|
|
{
|
|
GI_PROXY_script.Degrade_speed = 0.005f;
|
|
}
|
|
else
|
|
{
|
|
GI_PROXY_script.Degrade_speed = 0.035f;
|
|
}
|
|
if (GI_PROXY_script.Appear_speed == 0.025f)
|
|
{
|
|
GI_PROXY_script.Appear_speed = 0.009f;
|
|
}
|
|
else
|
|
{
|
|
GI_PROXY_script.Appear_speed = 0.025f;
|
|
}
|
|
if (GI_PROXY_script.Bounce_Intensity == 0.099f)
|
|
{
|
|
GI_PROXY_script.Bounce_Intensity = 0.22f;
|
|
}
|
|
else
|
|
{
|
|
GI_PROXY_script.Bounce_Intensity = 0.099f;
|
|
}
|
|
if (GI_PROXY_script.Color_change_speed == 16f)
|
|
{
|
|
GI_PROXY_script.Color_change_speed = 7f;
|
|
}
|
|
else
|
|
{
|
|
GI_PROXY_script.Color_change_speed = 16f;
|
|
}
|
|
}
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
}
|
|
}
|
|
}
|