示例#1
0
    // Protected
    void Awake()
    {
        if (!m_goWrong)
        {
            m_goWrong = GameObject.Find("Plane_Wrong");
        }
        if (!m_goCorrect)
        {
            m_goCorrect = GameObject.Find("Plane_Correct");
        }
        if (!m_oPreview)
        {
            m_oPreview = GameObject.Find("PreviewFlip").GetComponent <TextMesh>();
        }
        if (!m_oScore)
        {
            m_oScore = GameObject.Find("Score").GetComponent <TextMesh>();
        }

        if (!m_oInstance)
        {
            m_oInstance = this;
        }
        else
        {
            Debug.DebugBreak();          // There should not be more than one of this in the scene!
        }
        m_oPreview.gameObject.SetActive(false);
    }
示例#2
0
    // Protected
    void Awake()
    {
        if ( !m_goWrong ) 	m_goWrong	= GameObject.Find("Plane_Wrong");
        if ( !m_goCorrect )	m_goCorrect	= GameObject.Find("Plane_Correct");
        if ( !m_oPreview )	m_oPreview	= GameObject.Find("PreviewFlip").GetComponent<TextMesh>();
        if ( !m_oScore )	m_oScore	= GameObject.Find("Score").GetComponent<TextMesh>();

        if ( !m_oInstance ) m_oInstance = this;
        else Debug.DebugBreak(); // There should not be more than one of this in the scene!

        m_oPreview.gameObject.SetActive(false);
    }
示例#3
0
 void OnDestroy()
 {
     m_oInstance = null;
 }
示例#4
0
 void OnDestroy()
 {
     m_oInstance = null;
 }