void Start()
    {
        GameObject tempObj = GameObject.Find("Character");

        scriptInstance = tempObj.GetComponent <Character3>();
        GameObject tempObj2 = GameObject.Find("Sphere");

        scriptCantouch = tempObj2.GetComponent <NewBehaviourScript3>();
    }
Beispiel #2
0
    // Start is called before the first frame update
    void Start()
    {
        AudioListener.volume = PlayerPrefs.GetFloat("volume", 1.0f);

        GameObject tempObj = GameObject.Find("Sphere");

        scriptInstance6 = tempObj.GetComponent <NewBehaviourScript3>();
        GameObject tempObj2 = GameObject.Find("Character");

        scriptInstance5   = tempObj2.GetComponent <Character3>();
        MusicSource4.clip = clip4;
    }
Beispiel #3
0
    void Update()
    {
        n = NewBehaviourScript3.m;
        if (n == 3 && flag == true)
        {
            GameObject tempObj = GameObject.Find("Sphere");
            scriptInstance = tempObj.GetComponent <NewBehaviourScript3>();
            GameObject tempObj2 = GameObject.Find("Main Camera");
            scriptInstance2 = tempObj2.GetComponent <CameraPerspective3>();
            GameObject tempObj3 = GameObject.Find("Canvas");
            scriptInstanceGameOver = tempObj3.GetComponent <GameoverManager3>();
            //Access playerScore variable from ScriptA


            flag = false;
        }
    }