Exemplo n.º 1
0
    void Update()
    {
        if (solved == 10)
        {
            GameObject.Find("couple_0").GetComponent <Animator>().SetBool("phones", true);
            CarnivalStars.turnOff = true;
            //EndRiddle
            if (!mainThemePlaying)
            {
                musicScript.ChangeMusicTrack("RiddleTrain", true);
                StartCoroutine(SetToMain());
                mainThemePlaying = true;
            }

            if (!exited)
            {
                exited = true;
                gameManager.RiddleExit();
            }
        }
        else if (solved == 1)
        {
            musicScript.playerState.setParameterValue("progress", 1f);
        }
        else if (solved == 6)
        {
            musicScript.playerState.setParameterValue("outro", 1f);
        }
    }
Exemplo n.º 2
0
 public void Riddle()
 {
     inRiddle = true;
     musicScript.ChangeMusicTrack("Riddle", true);
     Cursor.visible = true;
     cameraS.ManualAdjust();
 }
Exemplo n.º 3
0
    private void OnMouseDown()
    {
        Girls.lampsOn = true;
        MusicManager musicScript = GameObject.Find("/Music").GetComponent <MusicManager>();

        musicScript.ChangeMusicTrack("Main", true);
        musicScript.playerState.setParameterValue("progress", 1f);
        gameManager.RiddleExit();
    }
Exemplo n.º 4
0
    public void Check()
    {
        if (amountSolved < 3)
        {
            if (LongClockHandle.hour == 3 && DepartureCities.signState == 4 && LongClockHandle.snap == 3)
            {
                if (solved[0] == false)
                {
                    solved[0]      = true;
                    Train.position = 2;
                    amountSolved++;
                }
            }
            else if (LongClockHandle.hour == 3 && DepartureCities.signState == 9 && LongClockHandle.snap == 1)
            {
                if (solved[1] == false)
                {
                    solved[1]      = true;
                    FatWoman.leave = true;
                    Train.position = 2;
                    amountSolved++;
                }
            }
            else if (LongClockHandle.hour == 2 && DepartureCities.signState == 2 && LongClockHandle.snap == 1)
            {
                if (solved[2] == false)
                {
                    solved[2]      = true;
                    Train.position = 2;
                    amountSolved++;
                }
            }
        }
        else
        {
            if (LongClockHandle.hour == 2 && DepartureCities.signState == 1 && LongClockHandle.snap == 3)
            {
                Train.position = 2;
                solved[3]      = true;
                gameManagerScript.RiddleExit();
                musicScript.ChangeMusicTrack("RiddleTrain", true);
                CameraScript.transitioning = true;
            }
        }

        if (amountSolved == 1 && !progressing)
        {
            musicScript.playerState.setParameterValue("progress", (float)1);
            progressing = true;
        }

        if (amountSolved == 3)
        {
            musicScript.playerState.setParameterValue("outro", (float)1);
        }
    }
Exemplo n.º 5
0
    void Update()
    {
        switch (position)
        {
        case 1:
            if (!arrivePlaying)
            {
                StartTrainSound(arriveState, arriveSound); arrivePlaying = true;
            }
            transform.position = Vector3.Lerp(transform.position, new Vector3(75.12f, transform.position.y, transform.position.z), 0.03f);
            timer += Time.deltaTime;
            if (timer > leaveTime)
            {
                timer = 0;
                position++;
                StopTrainSound(arriveState);
                arrivePlaying = false;
            }
            break;

        case 2:
            if (!leavePlaying)
            {
                StartTrainSound(leaveState, leaveSound); leavePlaying = true;
            }
            timer += Time.deltaTime;
            if (timer > resetTime)
            {
                michaelsShop.GetComponent <SpriteRenderer>().sortingLayerName = "Buildings1";            //avoid graphical glitches
                StopTrainSound(leaveState);
                leavePlaying = false;
                Destroy(gameObject);
            }
            transform.position = Vector3.Lerp(transform.position, new Vector3(160f, transform.position.y, transform.position.z), 0.005f);
            break;
        }

        if (transform.position.x > 55 && !mainTheme)
        {
            musicScript.ChangeMusicTrack("Main", true);
            mainTheme = true;
        }
    }
Exemplo n.º 6
0
 public void SpawnWaveOfMonsters(int roomNumber)
 {
     messagePopup.ReceiveStringAndShowPopup("Room " + roomNumber);
     currentRound    = stageFile.rounds[roomNumber - 1].round;
     roomText.text   = "Room : " + roomNumber;
     monstersToSpawn = currentRound.Length;
     monsterCount    = monstersToSpawn;
     for (int i = 1; i <= monstersToSpawn; i++)
     {
         monsters[i - 1].gameObject.SetActive(true);
         monsters[i - 1].MonsterSheet  = currentRound[i - 1];
         monsters[i - 1].MonsterNumber = i;
         monsters[i - 1].OnSpawn(stageFile.stageLevel);
         if (monsters[i - 1].MonsterSheet.IsABoss())
         {
             musicManager.ChangeMusicTrack(3); //boss track, button cant take enum as parameter so had to make it int.
             Debug.Log("hello");
         }
     }
     this.roomNumber++;
 }