Exemplo n.º 1
0
    void Start()
    {
        monkeyScript  = GameObject.Find("monkey").GetComponent <monkey_Level_10>();
        zebraScript   = GameObject.Find("zebra").GetComponent <zebra_Level_10>();
        rhinoScript   = GameObject.Find("rhino").GetComponent <rhino_Level_10>();
        gorillaScript = GameObject.Find("gorilla").GetComponent <gorilla_Level_10>();

        dogFightDustScript = GameObject.Find("dogFightDust").GetComponent <dogFightDust>();

        monkey        = GameObject.Find("monkey");
        zebra         = GameObject.Find("zebra");
        rhino         = GameObject.Find("rhino");
        dogLimitArea  = GameObject.Find("dogLimitArea");
        dogLimitAreaY = GameObject.Find("dogLimitAreaY");

        anim = this.GetComponent <Animator>();

        highlightZebMeercat01 = GameObject.Find("highlightZebMeercat01");
        highlightZebMeercat02 = GameObject.Find("highlightZebMeercat02");
        highlightZebMeercat03 = GameObject.Find("highlightZebMeercat03");
        highlightZebMeercat04 = GameObject.Find("highlightZebMeercat04");
        highlightZebMeercat05 = GameObject.Find("highlightZebMeercat05");
        highlightZebMeercat06 = GameObject.Find("highlightZebMeercat06");
        highlightZebRabbit01  = GameObject.Find("highlightZebRabbit01");
        highlightZebRabbit02  = GameObject.Find("highlightZebRabbit02");
        highlightZebRabbit03  = GameObject.Find("highlightZebRabbit03");
        highlightZebRabbit04  = GameObject.Find("highlightZebRabbit04");
        highlightZebRabbit05  = GameObject.Find("highlightZebRabbit05");
        highlightZebTeller01  = GameObject.Find("highlightZebTeller01");
        highlightZebTeller02  = GameObject.Find("highlightZebTeller02");
        highlightZebTeller03  = GameObject.Find("highlightZebTeller03");
        highlightZebTeller04  = GameObject.Find("highlightZebTeller04");
        highlightZebTeller05  = GameObject.Find("highlightZebTeller05");
        highlightZebTeller06  = GameObject.Find("highlightZebTeller06");
        highlightZebTeller07  = GameObject.Find("highlightZebTeller07");
        highlightZebTeller08  = GameObject.Find("highlightZebTeller08");
        highlightZebTeller09  = GameObject.Find("highlightZebTeller09");
        highlightZebTeller10  = GameObject.Find("highlightZebTeller10");
        highlightZebSafebox   = GameObject.Find("highlightZebSafebox");
        highlightZebSafebox02 = GameObject.Find("highlightZebSafebox02");
        highlightZebSafebox03 = GameObject.Find("highlightZebSafebox03");
    }
    void Start()
    {
        highlightZebMeercat01 = GameObject.Find("highlightZebMeercat01");
        highlightZebMeercat02 = GameObject.Find("highlightZebMeercat02");
        highlightZebMeercat03 = GameObject.Find("highlightZebMeercat03");
        highlightZebMeercat04 = GameObject.Find("highlightZebMeercat04");
        highlightZebMeercat05 = GameObject.Find("highlightZebMeercat05");
        highlightZebMeercat06 = GameObject.Find("highlightZebMeercat06");
        highlightZebRabbit01  = GameObject.Find("highlightZebRabbit01");
        highlightZebRabbit02  = GameObject.Find("highlightZebRabbit02");
        highlightZebRabbit03  = GameObject.Find("highlightZebRabbit03");
        highlightZebRabbit04  = GameObject.Find("highlightZebRabbit04");
        highlightZebRabbit05  = GameObject.Find("highlightZebRabbit05");
        highlightZebTeller01  = GameObject.Find("highlightZebTeller01");
        highlightZebTeller02  = GameObject.Find("highlightZebTeller02");
        highlightZebTeller03  = GameObject.Find("highlightZebTeller03");
        highlightZebTeller04  = GameObject.Find("highlightZebTeller04");
        highlightZebTeller05  = GameObject.Find("highlightZebTeller05");
        highlightZebTeller06  = GameObject.Find("highlightZebTeller06");
        highlightZebTeller07  = GameObject.Find("highlightZebTeller07");
        highlightZebTeller08  = GameObject.Find("highlightZebTeller08");
        highlightZebTeller09  = GameObject.Find("highlightZebTeller09");
        highlightZebTeller10  = GameObject.Find("highlightZebTeller10");
        highlightZebSafebox   = GameObject.Find("highlightZebSafebox");
        highlightZebSafebox02 = GameObject.Find("highlightZebSafebox02");
        highlightZebSafebox03 = GameObject.Find("highlightZebSafebox03");

        dummyHighlightZebMeercat01 = GameObject.Find("dummyHighlightZebMeercat01");
        dummyHighlightZebMeercat02 = GameObject.Find("dummyHighlightZebMeercat02");
        dummyHighlightZebMeercat03 = GameObject.Find("dummyHighlightZebMeercat03");
        dummyHighlightZebMeercat04 = GameObject.Find("dummyHighlightZebMeercat04");
        dummyHighlightZebMeercat05 = GameObject.Find("dummyHighlightZebMeercat05");
        dummyHighlightZebMeercat06 = GameObject.Find("dummyHighlightZebMeercat06");
        dummyHighlightZebRabbit01  = GameObject.Find("dummyHighlightZebRabbit01");
        dummyHighlightZebRabbit02  = GameObject.Find("dummyHighlightZebRabbit02");
        dummyHighlightZebRabbit03  = GameObject.Find("dummyHighlightZebRabbit03");
        dummyHighlightZebRabbit04  = GameObject.Find("dummyHighlightZebRabbit04");
        dummyHighlightZebRabbit05  = GameObject.Find("dummyHighlightZebRabbit05");
        dummyHighlightZebTeller01  = GameObject.Find("dummyHighlightZebTeller01");
        dummyHighlightZebTeller02  = GameObject.Find("dummyHighlightZebTeller02");
        dummyHighlightZebTeller03  = GameObject.Find("dummyHighlightZebTeller03");
        dummyHighlightZebTeller04  = GameObject.Find("dummyHighlightZebTeller04");
        dummyHighlightZebTeller05  = GameObject.Find("dummyHighlightZebTeller05");
        dummyHighlightZebTeller06  = GameObject.Find("dummyHighlightZebTeller06");
        dummyHighlightZebTeller07  = GameObject.Find("dummyHighlightZebTeller07");
        dummyHighlightZebTeller08  = GameObject.Find("dummyHighlightZebTeller08");
        dummyHighlightZebTeller09  = GameObject.Find("dummyHighlightZebTeller09");
        dummyHighlightZebTeller10  = GameObject.Find("dummyHighlightZebTeller10");
        dummyHighlightZebSafebox   = GameObject.Find("dummyHighlightZebSafebox");
        dummyHighlightZebSafebox02 = GameObject.Find("dummyHighlightZebSafebox02");
        dummyHighlightZebSafebox03 = GameObject.Find("dummyHighlightZebSafebox03");

        moneyTextMeercat01 = GameObject.Find("moneyTextMeercat01");
        moneyTextMeercat02 = GameObject.Find("moneyTextMeercat02");
        moneyTextMeercat03 = GameObject.Find("moneyTextMeercat03");
        moneyTextMeercat04 = GameObject.Find("moneyTextMeercat04");
        moneyTextMeercat05 = GameObject.Find("moneyTextMeercat05");
        moneyTextMeercat06 = GameObject.Find("moneyTextMeercat06");
        moneyTextRabbit01  = GameObject.Find("moneyTextRabbit01");
        moneyTextRabbit02  = GameObject.Find("moneyTextRabbit02");
        moneyTextRabbit03  = GameObject.Find("moneyTextRabbit03");
        moneyTextRabbit04  = GameObject.Find("moneyTextRabbit04");
        moneyTextRabbit05  = GameObject.Find("moneyTextRabbit05");
        moneyTextTeller01  = GameObject.Find("moneyTextTeller01");
        moneyTextTeller02  = GameObject.Find("moneyTextTeller02");
        moneyTextTeller03  = GameObject.Find("moneyTextTeller03");
        moneyTextTeller04  = GameObject.Find("moneyTextTeller04");
        moneyTextTeller05  = GameObject.Find("moneyTextTeller05");
        moneyTextTeller06  = GameObject.Find("moneyTextTeller06");
        moneyTextTeller07  = GameObject.Find("moneyTextTeller07");
        moneyTextTeller08  = GameObject.Find("moneyTextTeller08");
        moneyTextTeller09  = GameObject.Find("moneyTextTeller09");
        moneyTextTeller10  = GameObject.Find("moneyTextTeller10");
        moneyTextSafebox   = GameObject.Find("moneyTextSafebox");
        moneyTextSafebox02 = GameObject.Find("moneyTextSafebox02");
        moneyTextSafebox03 = GameObject.Find("moneyTextSafebox03");

        moneyTeller01  = GameObject.Find("moneyTeller01");
        moneyTeller02  = GameObject.Find("moneyTeller02");
        moneyTeller03  = GameObject.Find("moneyTeller03");
        moneyTeller04  = GameObject.Find("moneyTeller04");
        moneyTeller05  = GameObject.Find("moneyTeller05");
        moneyTeller06  = GameObject.Find("moneyTeller06");
        moneyTeller07  = GameObject.Find("moneyTeller07");
        moneyTeller08  = GameObject.Find("moneyTeller08");
        moneyTeller09  = GameObject.Find("moneyTeller09");
        moneyTeller10  = GameObject.Find("moneyTeller10");
        moneySafebox   = GameObject.Find("moneySafebox");
        moneySafebox02 = GameObject.Find("moneySafebox02");
        moneySafebox03 = GameObject.Find("moneySafebox03");

        zebra       = GameObject.Find("zebra");
        zebraScript = GameObject.Find("zebra").GetComponent <zebra_Level_10>();

        scoreMoney = GameObject.Find("scoreGUItext").GetComponent <gameScore_Level_10>();

        timerM1_10secondsObject   = GameObject.Find("timerM1_10seconds");
        timerM2_10secondsObject   = GameObject.Find("timerM2_10seconds");
        timerM3_10secondsObject   = GameObject.Find("timerM3_10seconds");
        timerM4_10secondsObject   = GameObject.Find("timerM4_10seconds");
        timerM5_10secondsObject   = GameObject.Find("timerM5_10seconds");
        timerM6_10secondsObject   = GameObject.Find("timerM6_10seconds");
        timerR1_10secondsObject   = GameObject.Find("timerR1_10seconds");
        timerR2_10secondsObject   = GameObject.Find("timerR2_10seconds");
        timerR3_10secondsObject   = GameObject.Find("timerR3_10seconds");
        timerR4_10secondsObject   = GameObject.Find("timerR4_10seconds");
        timerR5_10secondsObject   = GameObject.Find("timerR5_10seconds");
        timerT1_10secondsObject   = GameObject.Find("timerT1_10seconds");
        timerT2_10secondsObject   = GameObject.Find("timerT2_10seconds");
        timerT3_10secondsObject   = GameObject.Find("timerT3_10seconds");
        timerT4_10secondsObject   = GameObject.Find("timerT4_10seconds");
        timerT5_10secondsObject   = GameObject.Find("timerT5_10seconds");
        timerT6_10secondsObject   = GameObject.Find("timerT6_10seconds");
        timerT7_10secondsObject   = GameObject.Find("timerT7_10seconds");
        timerT8_10secondsObject   = GameObject.Find("timerT8_10seconds");
        timerT9_10secondsObject   = GameObject.Find("timerT9_10seconds");
        timerT10_10secondsObject  = GameObject.Find("timerT10_10seconds");
        timerSB_10secondsObject   = GameObject.Find("timerSB_10seconds");
        timerSB02_10secondsObject = GameObject.Find("timerSB02_10seconds");
        timerSB03_10secondsObject = GameObject.Find("timerSB03_10seconds");

        anim = this.GetComponent <Animator>();
    }
Exemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        cameraScript      = GameObject.Find("Main Camera").GetComponent <Camera>();
        dummyCameraZoon01 = GameObject.Find("dummyCameraZoon01");
        dummyCameraZoon02 = GameObject.Find("dummyCameraZoon02");
        camera            = GameObject.Find("Main Camera");

        rhino               = GameObject.Find("rhino");
        rhinoDummy          = GameObject.Find("rhinoDummy");
        highlightZebSafebox = GameObject.Find("highlightZebSafebox");

        //total score from previews lavels
        lastLevelScore = PlayerPrefs.GetInt("Player Score");

        zebraScript = GameObject.Find("zebra").GetComponent <zebra_Level_10>();
        zebraScript.moneyDone.Play();

        totalScore   = totalScore + lastLevelScore;
        guiText.text = ("$" + totalScore.ToString());

        moneyRandomMeercat01 = PlayerPrefs.GetInt("moneyRandomMeercat01_level10");
        moneyRandomMeercat02 = PlayerPrefs.GetInt("moneyRandomMeercat02_level10");
        moneyRandomMeercat03 = PlayerPrefs.GetInt("moneyRandomMeercat03_level10");
        moneyRandomMeercat04 = PlayerPrefs.GetInt("moneyRandomMeercat04_level10");
        moneyRandomMeercat05 = PlayerPrefs.GetInt("moneyRandomMeercat05_level10");
        moneyRandomMeercat06 = PlayerPrefs.GetInt("moneyRandomMeercat06_level10");
        moneyRandomRabbit01  = PlayerPrefs.GetInt("moneyRandomRabbit01_level10");
        moneyRandomRabbit02  = PlayerPrefs.GetInt("moneyRandomRabbit02_level10");
        moneyRandomRabbit03  = PlayerPrefs.GetInt("moneyRandomRabbit03_level10");
        moneyRandomRabbit04  = PlayerPrefs.GetInt("moneyRandomRabbit04_level10");
        moneyRandomRabbit05  = PlayerPrefs.GetInt("moneyRandomRabbit05_level10");
        moneyRandomTeller01  = PlayerPrefs.GetInt("moneyRandomTeller01_level10");
        moneyRandomTeller02  = PlayerPrefs.GetInt("moneyRandomTeller02_level10");
        moneyRandomTeller03  = PlayerPrefs.GetInt("moneyRandomTeller03_level10");
        moneyRandomTeller04  = PlayerPrefs.GetInt("moneyRandomTeller04_level10");
        moneyRandomTeller05  = PlayerPrefs.GetInt("moneyRandomTeller05_level10");
        moneyRandomTeller06  = PlayerPrefs.GetInt("moneyRandomTeller06_level10");
        moneyRandomTeller07  = PlayerPrefs.GetInt("moneyRandomTeller07_level10");
        moneyRandomTeller08  = PlayerPrefs.GetInt("moneyRandomTeller08_level10");
        moneyRandomTeller09  = PlayerPrefs.GetInt("moneyRandomTeller09_level10");
        moneyRandomTeller10  = PlayerPrefs.GetInt("moneyRandomTeller10_level10");
        moneyRandomSafebox   = PlayerPrefs.GetInt("moneyRandomSafebox_level10");
        moneyRandomSafebox02 = PlayerPrefs.GetInt("moneyRandomSafebox02_level10");
        moneyRandomSafebox03 = PlayerPrefs.GetInt("moneyRandomSafebox03_level10");


        totalLevelMoney = moneyRandomMeercat01 + moneyRandomMeercat02 + moneyRandomMeercat03
                          + moneyRandomMeercat04 + moneyRandomMeercat05 + moneyRandomMeercat06
                          + moneyRandomTeller01 + moneyRandomTeller02 + moneyRandomTeller03 + moneyRandomTeller04
                          + moneyRandomTeller05 + moneyRandomTeller06 + moneyRandomTeller07 + moneyRandomTeller08
                          + moneyRandomTeller09 + moneyRandomTeller10 +
                          moneyRandomRabbit01 + moneyRandomRabbit02 + moneyRandomRabbit03 + moneyRandomRabbit04 + moneyRandomRabbit05 +
                          moneyRandomSafebox + moneyRandomSafebox02 + moneyRandomSafebox03;

        //texts layer is 11 but not timer and score
        cameraScript.cullingMask = ~(1 << 11);


        int screenWidthX  = Screen.width;
        int screenHeightY = Screen.height;


        scoreBG = GameObject.Find("scoreBG");

        Vector3 scoreBGPos   = Camera.main.WorldToScreenPoint(scoreBG.transform.position);
        float   scoreBGPos_x = (scoreBGPos.x / screenWidthX);
        float   scoreBGPos_y = (scoreBGPos.y / screenHeightY);

        this.transform.position = new Vector3(scoreBGPos_x, scoreBGPos_y, 0);

        guiText.fontSize = (int)(Screen.width * 0.04f);
    }