Ejemplo n.º 1
0
    public void LevelUp()
    {
        // Get the new reset positions for the player
        GetStartPositions();
        Debug.Log("Got sets");

        // Move the camera up to the new level
        level = currentLevel + 1;
        moveCamera.MoveUp(true);

        int random = Random.Range(0, 2);

        if (random == 0)
        {
            audioManager.uiSoundTrack(uiSounds.cameraSwitch1);
        }
        else
        {
            audioManager.uiSoundTrack(uiSounds.cameraSwitch2);
        }


        SetPositions();
        Debug.Log("This is level " + level);
    }
Ejemplo n.º 2
0
    public void Initialize()
    {
        //player1SpawnPositions.Clear();
        //player2SpawnPositions.Clear();
        player1 = SwapManager.instance.objPlayer1;
        player2 = SwapManager.instance.objPlayer2;

        moveCamera   = FindObjectOfType <MoveCamera>();
        audioManager = FindObjectOfType <AudioManager>();

        audioManager.soundTrack(musicTrack.gameSound);
        audioManager.ambianceSoundTrack(environmentalSound.ambience);

        player1SpawnPositions = MessageCenter.instance.gameObject.GetComponent <DoorHolder>().StoreDoors(1);
        player2SpawnPositions = MessageCenter.instance.gameObject.GetComponent <DoorHolder>().StoreDoors(2);

        moveCamera.MoveUp(false);

        GetStartPositions();

        player1.transform.position = startPosPlayer1;
        player2.transform.position = startPosPlayer2;
    }