Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        cameraControl = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<CameraControl>();

        this.guiTexture.enabled = false;
        simulationScript = GameObject.FindGameObjectWithTag("GameController").GetComponent<SimulationScript>();
    }
Esempio n. 2
0
 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();
 }
Esempio n. 3
0
 public void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Esempio n. 4
0
    // 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;
    }
Esempio n. 5
0
 void Start()
 {
     simulationScript = GetComponent<SimulationScript>();
     aiBuilder = GetComponent<AIBuilder>();
 }