Ejemplo n.º 1
0
    void Update()
    {
        n = NewBehaviourScript.m;
        if (n == 3 && flag == true)
        {
            GameObject tempObj = GameObject.Find("Sphere");
            scriptInstance = tempObj.GetComponent <NewBehaviourScript>();
            GameObject tempObj2 = GameObject.Find("Main Camera");
            scriptInstance2 = tempObj2.GetComponent <CameraPerspective>();
            GameObject tempObj3 = GameObject.Find("Canvas");
            scriptInstanceGameOver = tempObj3.GetComponent <GameoverManager>();
            //Access playerScore variable from ScriptA

            flag = false;
        }
    }
Ejemplo n.º 2
0
 void Awake()
 {
     text  = this.GetComponent <Text> ();
     goMan = GameObject.Find("UI").GetComponent <GameoverManager>();
 }