Exemple #1
0
    void Start()
    {
        bottles = GameObject.Find("BottlesSpawner").GetComponent<BottlesSpawner>();
        buttonReleaseScript = GameObject.Find("ButtonRelease").GetComponent<ButtonReleased>();
        inGameUI = GameObject.Find("InGameUIManager").GetComponent<InGameUIManager>();
        menuButtonScript = GameObject.Find("UIPanel").GetComponent<MenuButton>();
        sm = GameObject.Find("SoundManager").GetComponent<SoundManager>();

        inGameUI.PF_Bottle = this.gameObject;

        if(!bottles.firstTimeBottleClicked && inGameUI.isLevel1)
        {
            inGameUI.Enable("5. CollectBottles");
            bottles.firstTimeBottleClicked = true;
        }

        //pbm.totalBottles++;
    }
Exemple #2
0
    void Start()
    {
        attackDelay = false;
        bottles = GameObject.Find("BottlesSpawner").GetComponent<BottlesSpawner>();
        buttonReleaseScript = GameObject.Find("ButtonRelease").GetComponent<ButtonReleased>();
        enemySpawner = GameObject.Find("EnemySpawner").GetComponent<EnemySpawner>();
        gameOverObj = GameObject.FindGameObjectWithTag("GO");
        gameSpawnScript = GameObject.Find("GameSpawner").GetComponent<GameSpawner>();
        inGameUI = GameObject.Find("InGameUIManager").GetComponent<InGameUIManager>();
        killed = false;
        nappyPad = GameObject.Find("NappyPadSpawner").GetComponent<NappyPadSpawner>().PF_NappyPad;
        nappyPadObj = GameObject.FindGameObjectWithTag("Ammo");

        if(nappyPadObj != null)
        {
            nappyPadScript = nappyPadObj.GetComponent<NappyPad>();
        }

        nappyPadShadow = GameObject.Find("NappyPadSpawner").GetComponent<NappyPadSpawner>().PF_NappyPadShadow;
        playerSpawn = GameObject.FindGameObjectWithTag("SpawnBlock").GetComponent<PlayerSpawn>();
        sm = GameObject.Find("SoundManager").GetComponent<SoundManager>();
        laugh = sm.laugh;

        SetState(0);
    }