// Use this for initialization void Start() { m_Balls = new List <GameObject>(); m_Balls.AddRange(GameObject.FindGameObjectsWithTag("Ball")); m_GuiTextScript = GameObject.FindGameObjectWithTag("GameManager") .GetComponent <GuiTextScript>(); }
// Use this for initialization void Start() { m_Balls = new List<GameObject>(); m_Balls.AddRange(GameObject.FindGameObjectsWithTag("Ball")); m_GuiTextScript = GameObject.FindGameObjectWithTag("GameManager") .GetComponent<GuiTextScript>(); }
// Use this for initialization void Start() { // set the current game state GameState = "Started"; // grab the attached guiscript component m_GuiText = this.GetComponent <GuiTextScript>(); // Set some values on the guiscript component m_GuiText.SetCans(m_FallenCans, m_Cans - m_FallenCans); // restore last cameraposition, if there // is one saved. Camera.main.transform.position = new Vector3( GameManagerScript.LastCameraXPosition, Camera.main.transform.position.y, Camera.main.transform.position.z); }
// Use this for initialization void Start() { // set the current game state GameState = "Started"; // grab the attached guiscript component m_GuiText = this.GetComponent<GuiTextScript>(); // Set some values on the guiscript component m_GuiText.SetCans(m_FallenCans,m_Cans - m_FallenCans); // restore last cameraposition, if there // is one saved. Camera.main.transform.position = new Vector3( GameManagerScript.LastCameraXPosition, Camera.main.transform.position.y, Camera.main.transform.position.z); }