// Use this for initialization void Start() { cameraControl = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<CameraControl>(); this.guiTexture.enabled = false; simulationScript = GameObject.FindGameObjectWithTag("GameController").GetComponent<SimulationScript>(); }
void Start() { simulation = SimulationScript.Instance; GetSimulationSpeedInputField().text = simulation.simulationSpeed.ToString(); GetEarthSizeSlider().maxValue = earthSizeArray.Length - 1; GetEarthSizeSlider().value = 6; GetGraphRefreshSlider().maxValue = graphRefreshRateArray.Length - 1; GetGraphRefreshSlider().value = 2; OnChangeEarthSizeChange(); OnChangeGraphRefreshChange(); }
public void Awake() { if (Instance == null) { Instance = this; } else { Destroy(gameObject); } }
// Use this for initialization void Start() { gridLoader = GameObject.FindGameObjectWithTag("GameController").GetComponent<GridLoader>(); guiScript = GameObject.FindGameObjectWithTag("GameController").GetComponent<GUIScript>(); cameraComponent = this.GetComponent<Camera>(); simulationScript = GameObject.FindGameObjectWithTag("GameController").GetComponent<SimulationScript>(); //This determines how the mouse direction is mapped to movements in the 3d space right = new Vector3(1,0,-1).normalized; upward = new Vector3(1,0,1).normalized; groundPlane = new Plane(new Vector3(0,1,0), new Vector3(0,0,0)); mode = "panning"; meteorSelect.renderer.enabled = false; shakeTime = 0.0f; }
void Start() { simulationScript = GetComponent<SimulationScript>(); aiBuilder = GetComponent<AIBuilder>(); }