コード例 #1
0
    // Use this for initialization
    void Start()
    {
        m_Balls = new List <GameObject>();
        m_Balls.AddRange(GameObject.FindGameObjectsWithTag("Ball"));

        m_GuiTextScript = GameObject.FindGameObjectWithTag("GameManager")
                          .GetComponent <GuiTextScript>();
    }
コード例 #2
0
    // Use this for initialization
    void Start()
    {
        m_Balls = new List<GameObject>();
        m_Balls.AddRange(GameObject.FindGameObjectsWithTag("Ball"));

        m_GuiTextScript = GameObject.FindGameObjectWithTag("GameManager")
            .GetComponent<GuiTextScript>();
    }
コード例 #3
0
    // 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);
    }
コード例 #4
0
    // 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);
    }