private void GotoMap()
    {
        switch (Attributes.mapID)
        {
        case 1:
            //GOTO Map 1
            LoadScene.Load(Strings.SCEN_GAMEPLAY_MAP1);
            break;

        case 2:
            //GOTO Map 2
            LoadScene.Load(Strings.SCEN_GAMEPLAY_MAP2);
            break;

        case 3:
            //GOTO Map 3
            LoadScene.Load(Strings.SCEN_GAMEPLAY_MAP3);
            break;

        default:
            //GOTO Map 1
            LoadScene.Load(Strings.SCEN_GAMEPLAY_MAP1);
            break;
        }
    }
Esempio n. 2
0
    void ChangueScene()
    {
        //AudioListener.volume=1;
        LoadScene load = gameObject.AddComponent <LoadScene>();

        load.Load("LogoFinalKlaus");
    }
Esempio n. 3
0
 void OnTriggerEnter2D(Collider2D col)
 {
     if (col.tag == "Player")
     {
         loadScene.Load();
     }
 }
Esempio n. 4
0
 void Load()
 {
     if (isReLoad)
     {
         return;
     }
     scene.Load();
 }
Esempio n. 5
0
    IEnumerator RestartGame()
    {
        yield return(new WaitForSeconds(10f));

        LoadScene tempLoad = new LoadScene();

        tempLoad.Load(0);
    }
Esempio n. 6
0
 // Click Button
 public void PlayBtn()
 {
     if (SoundManager.instance != null)
     {
         SoundManager.instance.PlaySFX(SFX.CLICK_BUTTON);
     }
     LoadScene.Load(Strings.SCEN_SELECTMAP);
     //Application.LoadLevel(Strings.SCEN_SELECTMAP);
 }
 private void FixedUpdate()
 {
     if (Check.Evaluate())
     {
         PlayerStatistics.Save(UnityEngine.SceneManagement.SceneManager.GetActiveScene().name);
         LoadScene.Load(SceneName);
         enabled = false;
     }
 }
Esempio n. 8
0
 public void GoHome()
 {
     //TODO Set gamestate = menu
     //TODO Goto home menu
     if (GameManager.instance != null)
     {
         GameManager.instance.SetGameState(GAMESTATE.MENU);
     }
     LoadScene.Load(Strings.SCEN_MENU);
 }
Esempio n. 9
0
 private void Retry()
 {
     if (_player.IsDead && Input.anyKey)
     {
         if (_loadScene != null)
         {
             _loadScene.Load();
         }
     }
 }
Esempio n. 10
0
    void Update()
    {
        blinkTimer += Time.deltaTime / Time.timeScale;

        if (state == GUI.GAME_OVER)
        {
            //make the menu blink, with "blink" sencond interval
            if (blinkTimer > blink)
            {
                blinkTimer = 0;

                gameOver.Find("Game Over Text").gameObject.SetActive(!gameOver.Find("Game Over Text").gameObject.activeSelf);
            }

            if (Input.GetButtonDown("Insert Coin") && (!GUIHiscore.hasNewHiscore || GUIHiscore.enteredName))
            {
                state          = GUI.GAME;
                GUIScore.SCORE = 0;
                LoadScene.Load("Game");
            }
        }
        else if (state == GUI.PAUSE)
        {
            //make the menu blink, with "blink" sencond interval
            if (blinkTimer > blink)
            {
                blinkTimer = 0;

                pause.gameObject.SetActive(!pause.gameObject.activeSelf);
            }

            if (Input.GetButtonDown("Pause"))
            {
                ChangeGameState(GUI.GAME);
                Time.timeScale = 1f;
            }
        }
        else if (state == GUI.GAME)
        {
            pause.gameObject.SetActive(false);

            if (Input.GetButtonDown("Pause"))
            {
                ChangeGameState(GUI.PAUSE);
                Time.timeScale = 0.00001f;
                pause.gameObject.SetActive(true);
                blinkTimer = 0;
            }
        }
    }
Esempio n. 11
0
    void OnTriggerEnter2D(Collider2D collider2d)
    {
        if (collider2d.tag.Equals("Player"))
        {
            /*
             * set load scene collider inactive.
             */
            gameObject.SetActive(false);
            var loadScene = new LoadScene();

            if (!scene.Equals(""))
            {
                loadScene.Load(scene);
            }
        }
    }
Esempio n. 12
0
 void LevelStart()
 {
     loadScene.Load(currentLevel - 1);
     Enemy.SpawnEnemy(currentLevel - 1);
     Player.RestoreHealth();
     //if (EnemyManager.EnemyNum == 0)
     //{
     //    Enemy.SpawnEnemy(currentLevel - 1);
     //    Player.RestoreHealth();
     //}
     //timer += Time.deltaTime;
     //if (timer > 2.0f)
     //{
     //    gameStatus = GameManager.GameStatus.Playing;
     //    timer = 0.0f;
     //}
 }
Esempio n. 13
0
    void EnemyDead()
    {
        if (currentLevel > maxLevel)
        {
            gameStatus = GameStatus.Win;
            Server.SetPCStatus((int)GameStatus.Win);
        }

        if (!ProhibitedZone.inZone)
        {
            loadScene.Load(currentLevel - 1);
            if (currentLevel == 1 && !BodyRC.RaiseHand())
            {
                return;
            }
            gameStatus = GameStatus.LevelStart;
            Server.SetPCStatus((int)GameStatus.LevelStart);
            timer = 0.0f;
        }
    }
Esempio n. 14
0
    void react(string s)
    {
        switch (s)
        {
        case "commencer":
        case "nouvelle":

            // load les script de demarrage
            UnityMainThreadDispatcher.Instance()
            .Enqueue(() => LoadScene.Load(LoadScene.Scene.Port, LoadScene.Scene.START));
            break;

        case "continuer":


            SceneManager.LoadScene("Port");
            SceneManager.UnloadSceneAsync("START");

            break;
        }
    }
Esempio n. 15
0
 public void EscolhidoNovoJogo()
 {
     LoadScene.Load(1);
 }
 void Back()
 {
     LoadScene.Load(ScenesName.mainScene);
 }
Esempio n. 17
0
 public void Load()
 {
     LoadScene.Load(SceneName);
 }
Esempio n. 18
0
 void EndLevel()
 {
     loadScene.buttons = buttons;
     loadScene.Load(0);
 }
Esempio n. 19
0
 void ClickStartGame()
 {
     LoadScene.Load(ScenesName.selectScene);
 }
Esempio n. 20
0
 void ClickOption()
 {
     LoadScene.Load(ScenesName.optionScene);
 }
Esempio n. 21
0
 public void QuitGamePlay()
 {
     GameManager.instance.SetGameState(GAMESTATE.MENU);
     gameObject.SetActive(false);
     LoadScene.Load(Strings.SCEN_MENU);
 }
Esempio n. 22
0
 public void RetryGamePlay()
 {
     LoadScene.Load(Application.loadedLevelName);
 }
Esempio n. 23
0
 public void BackMainMenu()
 {
     LoadScene.Load(Strings.SCEN_MENU);
 }
Esempio n. 24
0
 public void Retry()
 {
     //TODO Load application
     LoadScene.Load(Application.loadedLevelName);
 }