コード例 #1
0
    void Start()
    {
        int totalScore = PlayerPrefs.GetInt("Player Score");

        if (totalScore < 20000)
        {
            Destroy(gameObject);
        }


        money = GameObject.Find("scoreGUItext").GetComponent <moneyToBuy>();

        pauseBar  = GameObject.Find("pauseBar");
        gorillaBW = GameObject.Find("gorillaBW");

        pauseBarScript = GameObject.Find("pauseBar").GetComponent <pauseBarScale>();
        pauseEndScript = GameObject.Find("pauseEnd").GetComponent <pauseEndScale>();

        setPosButtonScript = GameObject.Find("bottunDone").GetComponent <bottunDone_TeamSelLev08>();

        dummyPos1 = GameObject.Find("dummyPos1");
        dummyPos2 = GameObject.Find("dummyPos2");
        dummyPos3 = GameObject.Find("dummyPos3");
        dummyPos4 = GameObject.Find("dummyPos4");

        pos1Check = GameObject.Find("dummyPos1").GetComponent <dummyChaMenuPos1>();
        pos2Check = GameObject.Find("dummyPos2").GetComponent <dummyChaMenuPos2>();
        pos3Check = GameObject.Find("dummyPos3").GetComponent <dummyChaMenuPos3>();
        pos4Check = GameObject.Find("dummyPos4").GetComponent <dummyChaMenuPos4>();
    }
コード例 #2
0
    void Start()
    {
        zebraInfo       = GameObject.Find("zebraInfo");
        handCuffs_zebra = GameObject.Find("handCuffs_zebra");

        if (PlayerPrefs.GetInt("zebraArrested") == 1)
        {
            handCuffs_zebra.renderer.enabled = true;
        }

        PlayerPrefs.GetInt("zebraArrested");

        int totalScore = PlayerPrefs.GetInt("Player Score");

        if (PlayerPrefs.GetInt("zebraArrested") == 1 && totalScore < 20000)
        {
            Destroy(gameObject);
        }

        money = GameObject.Find("scoreGUItext").GetComponent <moneyToBuy>();

        pauseBar = GameObject.Find("pauseBar");
        zebraBW  = GameObject.Find("zebraBW");

        pauseBarScript = GameObject.Find("pauseBar").GetComponent <pauseBarScale>();
        pauseEndScript = GameObject.Find("pauseEnd").GetComponent <pauseEndScale>();

        setPosButtonScript = GameObject.Find("bottunDone").GetComponent <bottunDone_TeamSelLev08>();

        dummyPos1 = GameObject.Find("dummyPos1");
        dummyPos2 = GameObject.Find("dummyPos2");
        dummyPos3 = GameObject.Find("dummyPos3");
        dummyPos4 = GameObject.Find("dummyPos4");

        hand = GameObject.Find("hand");

        pos1Check = GameObject.Find("dummyPos1").GetComponent <dummyChaMenuPos1>();
        pos2Check = GameObject.Find("dummyPos2").GetComponent <dummyChaMenuPos2>();
        pos3Check = GameObject.Find("dummyPos3").GetComponent <dummyChaMenuPos3>();
        pos4Check = GameObject.Find("dummyPos4").GetComponent <dummyChaMenuPos4>();
    }