// Start is called before the first frame update void Start() { string s = PlayerPrefs.GetString("name", ""); if (s == "") { sceneManager.LoadScene("SignUpScene"); } else { // load player data sceneManager.LoadScene("MainMenuScene"); } }
public void ReceiveDamage(int damage, Vector3 damagePoint) { if (isFireballPower) { if (isExtraLifePower) { powerupAnimation.Play("PlayerPowerupIn"); } else { powerupAnimation.Play("PlayerFireOut"); } isFireballPower = false; return; } else if (isExtraLifePower) { powerupAnimation.Play("PlayerPowerupOut"); isExtraLifePower = false; return; } stats.lives -= damage; if (stats.lives <= 0) { MySceneManager.LoadScene(SceneType.GameOver); } hitJump = (transform.position - damagePoint + Vector3.up) * 0.5f; }
void OnTriggerEnter(Collider collider) { var player = collider.GetComponent <PlayerController>(); if (player == null) { return; } if (isFirstLevel) { MySceneManager.LoadScene(SceneType.Level2); } else { var consValue = player.GetPlayerCoins(); if (consValue > perfectScore) { MySceneManager.LoadScene(SceneType.BahamasEnd); } else { MySceneManager.LoadScene(SceneType.RegularWinScene); } } }
private void Update() { if (!Input.GetKeyDown(KeyCode.Space)) { return; } MySceneManager.LoadScene(nexSceneIndex, this); }
void OnTriggerEnter(Collider collider) { var playerController = collider.GetComponent <PlayerController>(); if (playerController == null) { return; } MySceneManager.LoadScene(SceneType.Level1); }
public void LoadNextScene() { MySceneManager.LoadScene("Ch"); }
public void GoHome() { MySceneManager.LoadScene("SampleScene"); }
void NewGame() { MySceneManager.LoadScene(SceneType.Level1); }
public void LoadLevel(string scene) { UnityEngine.SceneManagement.SceneManager.LoadScene(scene); MySceneManager.LoadScene(scene); }
public void OnClothBtn() { MySceneManager.LoadScene("Shop"); }
public void LOAD_NEXT_LEVEL() { _sceneManager.LoadScene(2); print("load next level here"); }
public void LoadLevel(string scene) { Time.timeScale = 1f; UnityEngine.SceneManagement.SceneManager.LoadScene(scene); MySceneManager.LoadScene(scene); }
// Start is called before the first frame update private void Start() { MySceneManager.LoadScene(1, this); }