// Use this for initialization void Start() { currentScore = GameObject.Find("CurrentScore").GetComponent<CurrentScore>(); fullScore = GameObject.FindObjectOfType<FullScore>(); score = GetComponent<Score>(); energy = GetComponent<Energy>(); energyLine = GameObject.FindObjectOfType<EnergyLine>(); inputController = GameObject.FindObjectOfType<InputController>(); timerScript = GameObject.FindObjectOfType<TimerScript>(); timerUI = GameObject.FindObjectOfType<TimerUI>(); info = GetComponent<Info>(); taskStrings = GetComponent<TaskStrings>(); pauseButton = GameObject.FindObjectOfType<PauseButton>().gameObject; pauseMenu = GameObject.Find("Canvas").GetComponentInChildren<PauseMenu>(); // endMenu = GameObject.FindObjectOfType<EndMenu>(); taskHelper = GameObject.FindObjectOfType<TaskHelper>(); globalController = GetComponent<GlobalController>(); cam = GameObject.Find("MainCamera"); secondCamera = GameObject.Find("SecondCamera"); wordRideCanvas = GameObject.FindObjectOfType<WordRideCanvas>(); metalSparksPrefab = Resources.Load("Prefabs/Particles/MetalSpark") as GameObject; carUserParametres = GetComponent<CarUserParametres>(); gameUI = GameObject.FindObjectOfType<GameUI>(); canvasController = GameObject.FindObjectOfType<CanvasController>(); particleCanvas = GameObject.Find("ParticleCanvas"); carCreator = GameObject.FindObjectOfType<CarCreator>(); mainBonus = GameObject.FindObjectOfType<MainBonus>(); waitBackground = GameObject.FindObjectOfType<WaitBackground>(); }
// Use this for initialization void Start() { currentScore = GameObject.Find("CurrentScore").GetComponent <CurrentScore>(); fullScore = GameObject.FindObjectOfType <FullScore>(); score = GetComponent <Score>(); energy = GetComponent <Energy>(); energyLine = GameObject.FindObjectOfType <EnergyLine>(); inputController = GameObject.FindObjectOfType <InputController>(); timerScript = GameObject.FindObjectOfType <TimerScript>(); timerUI = GameObject.FindObjectOfType <TimerUI>(); info = GetComponent <Info>(); taskStrings = GetComponent <TaskStrings>(); pauseButton = GameObject.FindObjectOfType <PauseButton>().gameObject; pauseMenu = GameObject.Find("Canvas").GetComponentInChildren <PauseMenu>(); // endMenu = GameObject.FindObjectOfType<EndMenu>(); taskHelper = GameObject.FindObjectOfType <TaskHelper>(); globalController = GetComponent <GlobalController>(); cam = GameObject.Find("MainCamera"); secondCamera = GameObject.Find("SecondCamera"); wordRideCanvas = GameObject.FindObjectOfType <WordRideCanvas>(); metalSparksPrefab = Resources.Load("Prefabs/Particles/MetalSpark") as GameObject; carUserParametres = GetComponent <CarUserParametres>(); gameUI = GameObject.FindObjectOfType <GameUI>(); canvasController = GameObject.FindObjectOfType <CanvasController>(); particleCanvas = GameObject.Find("ParticleCanvas"); carCreator = GameObject.FindObjectOfType <CarCreator>(); mainBonus = GameObject.FindObjectOfType <MainBonus>(); waitBackground = GameObject.FindObjectOfType <WaitBackground>(); }