Files
2026-03-04 10:03:45 +08:00

1056 lines
26 KiB
C#

using Artngame.GIPROXY;
using UnityEngine;
namespace Artngame.SKYMASTER
{
public class SKYMASTER_DemoV17 : MonoBehaviour
{
private ControlGIPROXY_ATTRIUM_SM GI_controller;
private LightCollisionsPDM Gi_proxy;
public GameObject GI_ITEMS;
public ColorCorrectionCurvesSkyMaster Colorizer;
public AntialiasingSkyMaster AntiAlising;
public ContrastStretchSkyMaster ContrastFilter;
public GameObject Freeze_POOL;
public GameObject Freezer;
public GameObject Rain1;
public GameObject Rain2;
public GameObject Bats;
public GameObject Leaves;
public GameObject Floor;
public GameObject Floor_stripes;
public GameObject Floor_collider;
private bool Special_effects;
private bool Sky_effects;
public GameObject SkyDOME;
public GameObject Typhoon;
public GameObject ChainLightning;
public float Sun_time_start = 14.43f;
public GameObject SKYMASTER_OBJ;
private SkyMasterManager SUNMASTER;
public GameObject SUN;
public GameObject TREES;
public bool HUD_ON = true;
private float HDR = 0.8f;
private float Esun = 22f;
private float Kr = 0.0025f;
private float Km = 0.0015f;
private float GE = -0.96f;
private float SPEED = 0.01f;
private float HORIZON = 96f;
private float DuskLightG;
private float DuskLightB;
private float fSamples = 3f;
private float fScaleDepth = 0.5f;
private bool set_sun_start;
private float Ring_factor;
private Vector3 CURRENT_Force_color = new Vector3(0.65f, 0.52f, 0.475f);
private float Coloration = 0.28f;
private Vector4 TintColor = new Vector4(0f, 0f, 0f, 0f);
public bool enable_controls;
public GameObject Clouds_top;
public GameObject Clouds_bottom;
public GameObject Flat_Clouds_top;
public GameObject Flat_Clouds_bottom;
public GameObject Cloud_Dome;
public GameObject Cloud_Rays;
public GameObject Cloud_Static;
private float Dome_rot;
public GameObject Tornado1;
public GameObject Tornado2;
public GameObject Butterflies;
public GameObject FreezeEffect;
public GameObject LightningStorm;
public bool Auto_Season_Cycle;
private float Cycle_speed = 1500f;
private bool GI_controls_on;
private int current_ground;
private int current_haze;
private int current_sky;
private SeasonalTerrainSKYMASTER TerrainHandle;
private SeasonalTerrainSKYMASTER MeshTerrainHandle;
public GameObject TerrainObj;
public GameObject HorizonObj;
public GameObject MeshTerrainObj;
public GameObject Water;
public GameObject CloudHanlder;
private float Camera_up;
private bool Rain1_on;
private bool Rain2_on;
private bool Leaves_on;
private bool Bats_on;
private bool Freeze_on;
private bool Colorcorrect_on;
private bool Contrast_on;
private bool AntiAliasng_on;
private bool SkyDome_on;
private bool MoonMesh_on;
private float TOD;
private bool Typhoon_on;
private bool Chain_on;
private void Start()
{
if (SKYMASTER_OBJ != null)
{
SUNMASTER = SKYMASTER_OBJ.GetComponent(typeof(SkyMasterManager)) as SkyMasterManager;
}
SPEED = SUNMASTER.SPEED;
SUNMASTER.Seasonal_change_auto = false;
HORIZON = SUNMASTER.Horizon_adj;
DuskLightG = SUNMASTER.Dusk_Sun_Color.g;
DuskLightB = SUNMASTER.Dusk_Sun_Color.b;
if (TerrainHandle == null)
{
TerrainObj.SetActive(value: true);
TerrainHandle = TerrainObj.GetComponentInChildren(typeof(SeasonalTerrainSKYMASTER)) as SeasonalTerrainSKYMASTER;
TerrainObj.SetActive(value: false);
}
if (MeshTerrainHandle == null)
{
MeshTerrainObj.SetActive(value: true);
MeshTerrainHandle = MeshTerrainObj.GetComponentInChildren(typeof(SeasonalTerrainSKYMASTER)) as SeasonalTerrainSKYMASTER;
}
TOD = SUNMASTER.Current_Time;
GI_controller = SUNMASTER.SUN_LIGHT.GetComponent(typeof(ControlGIPROXY_ATTRIUM_SM)) as ControlGIPROXY_ATTRIUM_SM;
Gi_proxy = SUNMASTER.SUN_LIGHT.GetComponent(typeof(LightCollisionsPDM)) as LightCollisionsPDM;
if (GI_controller != null)
{
GI_controller.enabled = false;
}
}
private void Disable_all()
{
if (Leaves.activeInHierarchy)
{
Leaves.SetActive(value: false);
}
if (Freezer.activeInHierarchy)
{
Freezer.SetActive(value: false);
}
if (Freeze_POOL.activeInHierarchy)
{
Freeze_POOL.SetActive(value: false);
}
if (Bats.activeInHierarchy)
{
Bats.SetActive(value: false);
}
if (Rain1.activeInHierarchy)
{
Rain1.SetActive(value: false);
}
if (Rain2.activeInHierarchy)
{
Rain2.SetActive(value: false);
}
if (Typhoon.activeInHierarchy)
{
Typhoon.SetActive(value: false);
}
if (ChainLightning.activeInHierarchy)
{
ChainLightning.SetActive(value: false);
}
}
private void OnGUI()
{
float num = 100f;
float num2 = 30f;
GUI.TextArea(new Rect(3f * num + 10f, num2 - 30f, num + 0f, 20f), "Camera height");
float leftValue = 100f;
if (current_ground == 1)
{
leftValue = 285f;
}
Camera_up = GUI.HorizontalSlider(new Rect(3f * num + 10f, num2 - 11f, num + 0f, 30f), Camera.main.transform.position.y, leftValue, 1560f);
Camera.main.transform.position = new Vector3(Camera.main.transform.position.x, Camera_up, Camera.main.transform.position.z);
if (Special_effects)
{
if ((current_ground == 2) | Typhoon_on)
{
if (Floor.activeInHierarchy)
{
Floor.SetActive(value: false);
}
if (Floor_stripes.activeInHierarchy)
{
Floor_stripes.SetActive(value: false);
}
if (!Floor_collider.activeInHierarchy)
{
Floor_collider.SetActive(value: true);
}
}
else
{
if (!Floor.activeInHierarchy)
{
Floor.SetActive(value: true);
}
if (!Floor_stripes.activeInHierarchy)
{
Floor_stripes.SetActive(value: true);
}
if (!Floor_collider.activeInHierarchy)
{
Floor_collider.SetActive(value: true);
}
}
}
else
{
if (Floor.activeInHierarchy)
{
Floor.SetActive(value: false);
}
if (Floor_stripes.activeInHierarchy)
{
Floor_stripes.SetActive(value: false);
}
if (Leaves.activeInHierarchy)
{
Leaves.SetActive(value: false);
}
if (Freezer.activeInHierarchy)
{
Freezer.SetActive(value: false);
}
if (Freeze_POOL.activeInHierarchy)
{
Freeze_POOL.SetActive(value: false);
}
if (Bats.activeInHierarchy)
{
Bats.SetActive(value: false);
}
if (Rain1.activeInHierarchy)
{
Rain1.SetActive(value: false);
}
if (Rain2.activeInHierarchy)
{
Rain2.SetActive(value: false);
}
if (Floor_collider.activeInHierarchy)
{
Floor_collider.SetActive(value: false);
}
}
string text = "Disable HUD";
if (!HUD_ON)
{
text = "Enable HUD";
}
if (GUI.Button(new Rect(5f, 0f * num2, num + 5f, 20f), text))
{
if (HUD_ON)
{
HUD_ON = false;
if (CloudHanlder.activeInHierarchy)
{
CloudHanlder.SetActive(value: false);
}
if (!GI_controller.enabled)
{
}
}
else
{
HUD_ON = true;
if (!CloudHanlder.activeInHierarchy)
{
CloudHanlder.SetActive(value: true);
}
}
}
if (!HUD_ON)
{
return;
}
string text2 = "On";
if (Sky_effects)
{
text2 = "Off";
}
if (!Special_effects && GUI.Button(new Rect(3f * num + 10f, num2 + 60f + 30f + 30f, num, 30f), "Sky FX " + text2))
{
if (Sky_effects)
{
Sky_effects = false;
}
else
{
Sky_effects = true;
Special_effects = false;
}
}
if (Sky_effects)
{
string text3 = "On";
if (SkyDome_on)
{
text3 = "Off";
}
if (GUI.Button(new Rect(25f + 3f * num + 10f, num2 + 60f + 30f + 30f + 30f, num, 20f), "Sky Dome " + text3))
{
if (SkyDome_on)
{
SkyDome_on = false;
SUNMASTER.Preset = 0;
if (SkyDOME.activeInHierarchy)
{
SkyDOME.SetActive(value: false);
}
}
else
{
SkyDome_on = true;
SUNMASTER.Preset = 5;
if (!SkyDOME.activeInHierarchy)
{
SkyDOME.SetActive(value: true);
}
}
}
string text4 = "On";
if (MoonMesh_on)
{
text4 = "Off";
}
if (GUI.Button(new Rect(25f + 3f * num + 10f, num2 + 60f + 30f + 30f + 30f + 20f, num, 20f), "Moon Mesh " + text4))
{
if (MoonMesh_on)
{
MoonMesh_on = false;
if (SUNMASTER.MoonObj.GetComponent<Renderer>().enabled)
{
SUNMASTER.MoonObj.GetComponent<Renderer>().enabled = false;
}
}
else
{
MoonMesh_on = true;
if (!SUNMASTER.MoonObj.GetComponent<Renderer>().enabled)
{
SUNMASTER.MoonObj.GetComponent<Renderer>().enabled = true;
}
}
}
GUI.TextArea(new Rect(25f + 3f * num + 10f, num2 + 60f + 30f + 30f + 30f + 20f + 20f + 2f, num, 20f), "Time of Day");
TOD = GUI.HorizontalSlider(new Rect(25f + 3f * num + 10f, num2 + 60f + 30f + 30f + 30f + 20f + 40f, num, 20f), SUNMASTER.Current_Time, 0f, 24f);
SUNMASTER.Current_Time = TOD;
}
if (SPEED < 5f)
{
SPEED = 0f;
}
string text5 = "On";
if (Special_effects)
{
text5 = "Off";
}
if (GUI.Button(new Rect(3f * num + 10f, num2 + 60f + 30f, num, 30f), "Special FX " + text5))
{
if (Special_effects)
{
Special_effects = false;
}
else
{
Special_effects = true;
Sky_effects = false;
}
}
if (Special_effects)
{
string text6 = "On";
if (AntiAliasng_on)
{
text6 = "Off";
}
if (GUI.Button(new Rect(25f + 3f * num + 10f, num2 + 60f + 30f + 30f, num, 20f), "AntiAlising " + text6))
{
if (AntiAliasng_on)
{
AntiAliasng_on = false;
AntiAlising.enabled = false;
}
else
{
AntiAliasng_on = true;
AntiAlising.enabled = true;
}
}
string text7 = "On";
if (Colorcorrect_on)
{
text7 = "Off";
}
if (GUI.Button(new Rect(25f + 3f * num + 10f, num2 + 60f + 30f + 20f + 30f, num, 20f), "Color FX " + text7))
{
if (Colorcorrect_on)
{
Colorcorrect_on = false;
Colorizer.enabled = false;
}
else
{
Colorcorrect_on = true;
Colorizer.enabled = true;
}
}
string text8 = "On";
if (Contrast_on)
{
text8 = "Off";
}
if (GUI.Button(new Rect(25f + 3f * num + 10f, num2 + 60f + 30f + 40f + 30f, num, 20f), "Contrast " + text8))
{
if (Contrast_on)
{
Contrast_on = false;
ContrastFilter.enabled = false;
}
else
{
Contrast_on = true;
ContrastFilter.enabled = true;
}
}
string text9 = "On";
if (Rain1_on)
{
text9 = "Off";
}
if (GUI.Button(new Rect(25f + 3f * num + 10f, num2 + 60f + 30f + 60f + 30f, num, 20f), "Rain " + text9))
{
if (Rain1_on)
{
Rain1_on = false;
if (Rain1.activeInHierarchy)
{
Rain1.SetActive(value: false);
}
}
else
{
Rain1_on = true;
Disable_all();
if (!Rain1.activeInHierarchy)
{
Rain1.SetActive(value: true);
}
}
}
string text10 = "On";
if (Rain2_on)
{
text10 = "Off";
}
if (GUI.Button(new Rect(25f + 3f * num + 10f, num2 + 60f + 30f + 80f + 30f, num, 20f), "Heavy Rain " + text10))
{
if (Rain2_on)
{
Rain2_on = false;
if (Rain2.activeInHierarchy)
{
Rain2.SetActive(value: false);
}
}
else
{
Rain2_on = true;
Disable_all();
if (!Rain2.activeInHierarchy)
{
Rain2.SetActive(value: true);
}
}
}
string text11 = "On";
if (Leaves_on)
{
text11 = "Off";
}
if (GUI.Button(new Rect(25f + 3f * num + 10f, num2 + 60f + 30f + 100f + 30f, num, 20f), "Leaves " + text11))
{
if (Leaves_on)
{
Leaves_on = false;
if (Leaves.activeInHierarchy)
{
Leaves.SetActive(value: false);
}
}
else
{
Leaves_on = true;
Disable_all();
if (!Leaves.activeInHierarchy)
{
Leaves.SetActive(value: true);
}
}
}
string text12 = "On";
if (Bats_on)
{
text12 = "Off";
}
if (GUI.Button(new Rect(25f + 3f * num + 10f, num2 + 60f + 30f + 120f + 30f, num, 20f), "Bats " + text12))
{
if (Bats_on)
{
Bats_on = false;
if (Bats.activeInHierarchy)
{
Bats.SetActive(value: false);
}
}
else
{
Bats_on = true;
Disable_all();
if (!Bats.activeInHierarchy)
{
Bats.SetActive(value: true);
}
}
}
string text13 = "On";
if (Freeze_on)
{
text13 = "Off";
}
if (GUI.Button(new Rect(25f + 3f * num + 10f, num2 + 60f + 30f + 140f + 30f, num, 20f), "Ice decals " + text13))
{
if (Freeze_on)
{
Freeze_on = false;
if (Freezer.activeInHierarchy)
{
Freezer.SetActive(value: false);
}
if (Freeze_POOL.activeInHierarchy)
{
Freeze_POOL.SetActive(value: false);
}
}
else
{
Freeze_on = true;
Disable_all();
if (!Freezer.activeInHierarchy)
{
Freezer.SetActive(value: true);
}
if (!Freeze_POOL.activeInHierarchy)
{
Freeze_POOL.SetActive(value: true);
}
}
}
string text14 = "On";
if (Typhoon_on)
{
text14 = "Off";
}
if (GUI.Button(new Rect(25f + 3f * num + 10f, num2 + 60f + 30f + 160f + 30f, num, 20f), "Tornados " + text14))
{
if (Typhoon_on)
{
Typhoon_on = false;
if (Typhoon.activeInHierarchy)
{
Typhoon.SetActive(value: false);
}
}
else
{
Typhoon_on = true;
Disable_all();
if (!Typhoon.activeInHierarchy)
{
Typhoon.SetActive(value: true);
}
}
}
string text15 = "On";
if (Chain_on)
{
text15 = "Off";
}
if (GUI.Button(new Rect(25f + 3f * num + 10f, num2 + 60f + 30f + 180f + 30f, num, 20f), "Lightning " + text15))
{
if (Chain_on)
{
Chain_on = false;
if (ChainLightning.activeInHierarchy)
{
ChainLightning.SetActive(value: false);
}
}
else
{
Chain_on = true;
Disable_all();
if (!ChainLightning.activeInHierarchy)
{
ChainLightning.SetActive(value: true);
}
}
}
}
if ((SUNMASTER.Current_Time != Sun_time_start) & !set_sun_start)
{
set_sun_start = true;
}
if (SUNMASTER.Season == 1)
{
if (!Butterflies.activeInHierarchy)
{
Butterflies.SetActive(value: true);
}
}
else if (Butterflies.activeInHierarchy)
{
Butterflies.SetActive(value: false);
}
if (GI_controller != null && GUI.Button(new Rect(1f * num + 2f * (num / 3f) - 25f, num2 + 60f + 10f, num / 3f + 35f, 20f), "GI Proxy"))
{
if (!GI_controller.enabled)
{
GI_controls_on = true;
GI_controller.enabled = true;
if (!GI_ITEMS.activeInHierarchy)
{
GI_ITEMS.SetActive(value: true);
}
Gi_proxy.enabled = true;
}
else
{
GI_controls_on = false;
GI_controller.enabled = false;
if (GI_ITEMS.activeInHierarchy)
{
GI_ITEMS.SetActive(value: false);
}
Gi_proxy.enabled = false;
}
}
if (GI_controls_on)
{
return;
}
if (!enable_controls && GUI.Button(new Rect(1f * num + 10f, num2 + 60f + 30f + 30f, num, 30f), "Cycle Seasons"))
{
if (!Auto_Season_Cycle)
{
Auto_Season_Cycle = true;
SUNMASTER.SPEED = 2431.818f;
SUNMASTER.Seasonal_change_auto = true;
}
else
{
Auto_Season_Cycle = false;
SUNMASTER.SPEED = 35f;
SUNMASTER.Seasonal_change_auto = false;
}
}
if (Auto_Season_Cycle)
{
Cycle_speed = GUI.HorizontalSlider(new Rect(5f * num + 10f, num2 + 80f + 30f, num, 30f), Cycle_speed, 50f, 2431.818f);
SUNMASTER.SPEED = Cycle_speed;
}
if (!Auto_Season_Cycle)
{
if (!enable_controls && GUI.Button(new Rect(1f * num + 10f, num2 + 60f + 30f, num, 30f), "Sunny"))
{
SUNMASTER.Weather = SkyMasterManager.Weather_types.Sunny;
SUNMASTER.On_demand = true;
}
if (GUI.Button(new Rect(2f * num + 10f, num2 - 0f, num, 30f), "Cloudy"))
{
SUNMASTER.Weather = SkyMasterManager.Weather_types.Cloudy;
SUNMASTER.On_demand = true;
}
if (GUI.Button(new Rect(2f * num + 10f, num2 + 30f, num, 30f), "Heavy Rain"))
{
SUNMASTER.Weather = SkyMasterManager.Weather_types.FlatClouds;
SUNMASTER.On_demand = true;
}
string text16 = "Spring";
if (SUNMASTER.Season == 2)
{
text16 = "Summer";
}
if (SUNMASTER.Season == 3)
{
text16 = "Autumn";
}
if (SUNMASTER.Season == 4)
{
text16 = "Winter";
}
GUI.TextArea(new Rect(2f * num + 10f - 0f, num2 + 60f + 30f, num / 1f, 25f), text16);
if (GUI.Button(new Rect(2f * num + 10f, num2 + 60f, num, 30f), "Cycle Season"))
{
if (SUNMASTER.Season == 0)
{
SUNMASTER.Season = 2;
}
else
{
SUNMASTER.Season++;
}
if (SUNMASTER.Season > 4)
{
SUNMASTER.Season = 1;
}
}
if (GUI.Button(new Rect(2f * num + 10f, num2 + 60f + 30f + 30f, num, 30f), "Foggy"))
{
SUNMASTER.Weather = SkyMasterManager.Weather_types.HeavyFog;
SUNMASTER.On_demand = true;
}
if (GUI.Button(new Rect(2f * num + 10f, 2f * num2 + 60f + 30f + 30f, num, 20f), "Toggle Ground"))
{
current_ground++;
if (current_ground > 3)
{
current_ground = 0;
}
}
if (current_ground == 0)
{
if (Water.activeInHierarchy)
{
Water.SetActive(value: false);
}
if (TerrainObj.activeInHierarchy)
{
TerrainObj.SetActive(value: false);
}
if (!MeshTerrainObj.activeInHierarchy)
{
MeshTerrainObj.SetActive(value: true);
}
if (!HorizonObj.activeInHierarchy)
{
HorizonObj.SetActive(value: true);
}
}
if (current_ground == 1)
{
if (Water.activeInHierarchy)
{
Water.SetActive(value: false);
}
if (!TerrainObj.activeInHierarchy)
{
TerrainObj.SetActive(value: true);
}
if (MeshTerrainObj.activeInHierarchy)
{
MeshTerrainObj.SetActive(value: false);
}
if (HorizonObj.activeInHierarchy)
{
HorizonObj.SetActive(value: false);
}
}
if (current_ground == 2)
{
if (!Water.activeInHierarchy)
{
Water.SetActive(value: true);
}
if (TerrainObj.activeInHierarchy)
{
TerrainObj.SetActive(value: false);
}
if (!MeshTerrainObj.activeInHierarchy)
{
MeshTerrainObj.SetActive(value: true);
}
if (HorizonObj.activeInHierarchy)
{
HorizonObj.SetActive(value: false);
}
}
if (current_ground == 3)
{
if (Water.activeInHierarchy)
{
Water.SetActive(value: false);
}
if (TerrainObj.activeInHierarchy)
{
TerrainObj.SetActive(value: false);
}
if (!MeshTerrainObj.activeInHierarchy)
{
MeshTerrainObj.SetActive(value: true);
}
if (HorizonObj.activeInHierarchy)
{
HorizonObj.SetActive(value: false);
}
}
if (GUI.Button(new Rect(2f * num + 10f, -10f + 3f * num2 + 60f + 30f + 30f, num, 20f), "Toggle Haze"))
{
current_haze++;
if (current_haze > 5)
{
current_haze = 0;
}
if (current_ground == 1)
{
TerrainHandle.FogPreset = current_haze;
}
else
{
MeshTerrainHandle.FogPreset = current_haze;
}
}
if (GUI.Button(new Rect(2f * num + 10f, -20f + 4f * num2 + 60f + 30f + 30f, num, 20f), "Toggle Sky"))
{
current_sky++;
if (current_sky > 4)
{
current_sky = 0;
}
SUNMASTER.Preset = current_sky;
SPEED = 5f;
}
GUI.TextArea(new Rect(3f * num + 10f, 2f * num2 + 60f + 30f + 30f, 15f, 19f), (current_ground + 1).ToString());
GUI.TextArea(new Rect(3f * num + 10f, -10f + 3f * num2 + 60f + 30f + 30f, 15f, 19f), (current_haze + 1).ToString());
GUI.TextArea(new Rect(3f * num + 10f, -20f + 4f * num2 + 60f + 30f + 30f, 15f, 19f), (current_sky + 1).ToString());
if (GUI.Button(new Rect(3f * num + 10f, num2 - 0f, num, 30f), "Snow storm"))
{
SUNMASTER.Weather = SkyMasterManager.Weather_types.FreezeStorm;
SUNMASTER.On_demand = true;
}
if (GUI.Button(new Rect(2f * num + 10f, num2 - 30f, num, 30f), "Volcano"))
{
SUNMASTER.Weather = SkyMasterManager.Weather_types.VolcanoErupt;
SUNMASTER.On_demand = true;
current_ground = 1;
}
if (GUI.Button(new Rect(3f * num + 10f, 2f * num2 + 0f, num, 30f), "Dark Storm"))
{
SUNMASTER.Weather = SkyMasterManager.Weather_types.HeavyStormDark;
SUNMASTER.On_demand = true;
}
if (GUI.Button(new Rect(4f * num + 10f, num2 - 30f, num, 30f), "Lightning"))
{
SUNMASTER.Weather = SkyMasterManager.Weather_types.LightningStorm;
SUNMASTER.On_demand = true;
}
if (!enable_controls)
{
if (GUI.Button(new Rect(1f * num + 10f, num2 - 30f, num, 30f), "Volume Fog"))
{
SUNMASTER.Weather = SkyMasterManager.Weather_types.RollingFog;
SUNMASTER.On_demand = true;
}
if (GUI.Button(new Rect(1f * num + 10f, num2 + 0f, num + 0f, 30f), "Tornado"))
{
SUNMASTER.Weather = SkyMasterManager.Weather_types.Tornado;
SUNMASTER.On_demand = true;
}
}
if (!enable_controls)
{
GUI.TextArea(new Rect(1f * num + 10f, num2 + 30f, num + 0f, 25f), "SkyDome rot");
Dome_rot = GUI.HorizontalSlider(new Rect(1f * num + 10f, num2 + 30f + 30f, num + 0f, 30f), Dome_rot, 0f, 10f);
SUNMASTER.Horizontal_factor = Dome_rot;
}
if (GUI.Button(new Rect(5f, 0f * num2 + 20f, num + 5f, 20f), "Enable Controls"))
{
if (enable_controls)
{
enable_controls = false;
SUNMASTER.Auto_Cycle_Sky = true;
}
else
{
enable_controls = true;
SUNMASTER.Auto_Cycle_Sky = false;
}
}
num2 += 20f;
float num3 = 50f;
GUI.TextArea(new Rect(5f, 5f * num2 + num3, 100f, 20f), "Speed");
SPEED = GUI.HorizontalSlider(new Rect(10f, 5f * num2 + num3 + 30f, 100f, 30f), SPEED, 0.01f, 70f);
SUNMASTER.SPEED = SPEED;
GUI.TextArea(new Rect(111f, 5f * num2 + num3, 50f, 20f), "Horizon");
HORIZON = GUI.HorizontalSlider(new Rect(111f, 5f * num2 + num3 + 30f, 50f, 30f), HORIZON, 90f, 170f);
SUNMASTER.Horizon_adj = HORIZON;
GUI.TextArea(new Rect(111f, 6f * num2 + num3, 50f, 20f), "DuskG");
DuskLightG = GUI.HorizontalSlider(new Rect(111f, 6f * num2 + num3 + 30f, 50f, 30f), DuskLightG, 0f, 0.5f);
SUNMASTER.Dusk_Sun_Color.g = DuskLightG;
GUI.TextArea(new Rect(111f, 7f * num2 + num3, 50f, 20f), "DuskB");
DuskLightB = GUI.HorizontalSlider(new Rect(111f, 7f * num2 + num3 + 30f, 50f, 30f), DuskLightB, 0f, 0.5f);
SUNMASTER.Dusk_Sun_Color.b = DuskLightB;
if (enable_controls)
{
GUI.TextArea(new Rect(5f, 0f * num2 + num3 + 5f, 130f, 20f), "Increase HDR brightness");
HDR = GUI.HorizontalSlider(new Rect(10f, 0f * num2 + num3 + 30f, 150f, 30f), HDR, 0.05f, 3f);
SUNMASTER.m_fExposure = HDR;
GUI.TextArea(new Rect(5f, 1f * num2 + num3, 130f, 20f), "Esun");
Esun = GUI.HorizontalSlider(new Rect(10f, 1f * num2 + num3 + 30f, 150f, 30f), Esun, 0.9f, 80f);
SUNMASTER.m_ESun = Esun;
GUI.TextArea(new Rect(5f, 2f * num2 + num3, 130f, 20f), "Kr - White to Red factor");
Kr = GUI.HorizontalSlider(new Rect(10f, 2f * num2 + num3 + 30f, 150f, 30f), Kr, 0.0001f, 0.014f);
SUNMASTER.m_Kr = Kr;
GUI.TextArea(new Rect(5f, 3f * num2 + num3, 130f, 20f), "Km - Vertical effect factor");
Km = GUI.HorizontalSlider(new Rect(10f, 3f * num2 + num3 + 30f, 150f, 30f), Km, 0.0003f, 0.1195f);
SUNMASTER.m_Km = Km;
GUI.TextArea(new Rect(5f, 4f * num2 + num3, 130f, 20f), "G - Focus factor");
GE = GUI.HorizontalSlider(new Rect(10f, 4f * num2 + num3 + 30f, 150f, 30f), GE, -0.69f, -0.9999f);
SUNMASTER.m_g = GE;
GUI.TextArea(new Rect(5f, 6f * num2 + num3, 100f, 20f), "Sun Ring factor");
Ring_factor = GUI.HorizontalSlider(new Rect(10f, 6f * num2 + num3 + 30f, 100f, 30f), Ring_factor, 0f, 0.15f);
SUNMASTER.Sun_ring_factor = Ring_factor;
GUI.TextArea(new Rect(5f, 7f * num2 + num3, 100f, 20f), "Samples");
fSamples = GUI.HorizontalSlider(new Rect(10f, 7f * num2 + num3 + 30f, 100f, 30f), fSamples, 1f, 4f);
SUNMASTER.m_fSamples = fSamples;
GUI.TextArea(new Rect(5f, 8f * num2 + num3, 130f, 20f), "Scale depth");
fScaleDepth = GUI.HorizontalSlider(new Rect(10f, 8f * num2 + num3 + 30f, 150f, 30f), fScaleDepth, 0.1f, 2f);
SUNMASTER.m_fRayleighScaleDepth = fScaleDepth;
float num4 = 50f;
float num5 = 50f;
Rect position = new Rect(num4 + 130f, num5 + 140f - 20f + 70f, 180f, 20f);
Vector3 cURRENT_Force_color = CURRENT_Force_color;
GUI.TextArea(position, "Tint: " + cURRENT_Force_color.ToString());
SUNMASTER.m_fWaveLength.x = GUI.HorizontalSlider(new Rect(num4 + 130f, num5 + 140f + 70f, 100f, 30f), SUNMASTER.m_fWaveLength.x, 0f, 1f);
CURRENT_Force_color.x = SUNMASTER.m_fWaveLength.x;
SUNMASTER.m_fWaveLength.y = GUI.HorizontalSlider(new Rect(num4 + 130f, num5 + 172f + 70f, 100f, 30f), SUNMASTER.m_fWaveLength.y, 0f, 1f);
CURRENT_Force_color.y = SUNMASTER.m_fWaveLength.y;
SUNMASTER.m_fWaveLength.z = GUI.HorizontalSlider(new Rect(num4 + 130f, num5 + 204f + 70f, 100f, 30f), SUNMASTER.m_fWaveLength.z, 0f, 1f);
CURRENT_Force_color.z = SUNMASTER.m_fWaveLength.z;
num4 = 50f;
num5 = 150f;
Rect position2 = new Rect(num4 + 130f, num5 + 140f - 20f + 70f, 180f, 20f);
Vector4 tintColor = TintColor;
GUI.TextArea(position2, "Global tint: " + tintColor.ToString());
SUNMASTER.m_TintColor.r = GUI.HorizontalSlider(new Rect(num4 + 130f, num5 + 140f + 70f, 100f, 30f), SUNMASTER.m_TintColor.r, 0f, 1f);
TintColor.x = SUNMASTER.m_TintColor.r;
SUNMASTER.m_TintColor.g = GUI.HorizontalSlider(new Rect(num4 + 130f, num5 + 172f + 70f, 100f, 30f), SUNMASTER.m_TintColor.g, 0f, 1f);
TintColor.y = SUNMASTER.m_TintColor.g;
SUNMASTER.m_TintColor.b = GUI.HorizontalSlider(new Rect(num4 + 130f, num5 + 204f + 70f, 100f, 30f), SUNMASTER.m_TintColor.b, 0f, 1f);
TintColor.z = SUNMASTER.m_TintColor.b;
GUI.TextArea(new Rect(num4 + 130f, num5 + 204f + 70f + 30f, 100f, 30f), "Coloration");
Coloration = GUI.HorizontalSlider(new Rect(num4 + 130f, num5 + 204f + 70f + 30f + 30f, 100f, 30f), Coloration, 0.1f, 2f);
SUNMASTER.m_Coloration = Coloration;
}
}
else
{
string text17 = "Spring";
if (SUNMASTER.Season == 2)
{
text17 = "Summer";
}
if (SUNMASTER.Season == 3)
{
text17 = "Autumn";
}
if (SUNMASTER.Season == 4)
{
text17 = "Winter";
}
GUI.TextArea(new Rect(5f * num + 10f, num2 + 30f + 30f, num, 30f), text17);
}
}
}
}