public void Back() { if (FindObjectOfType <MusicManager>()) { FindObjectOfType <MusicManager>().GetComponent <AudioSource>().Stop(); } SceneManagementUtil.Load(SceneManagementUtil.Scenes.Izometrik); }
public void Back() { if (FindObjectOfType <MusicManager>()) { FindObjectOfType <MusicManager>().GetComponent <AudioSource>().Play(); } if (FindObjectOfType <DesertMusicManager>()) { FindObjectOfType <DesertMusicManager>().GetComponent <AudioSource>().Play(); } SceneManagementUtil.Load(SceneManagementUtil.Scenes.AnaEkran); }
private void Update() { if (Input.GetKeyDown(KeyCode.Escape)) { SceneManagementUtil.Quit(); } if (!Input.GetMouseButtonDown(0)) { return; } var pos = new Vector2(Input.mousePosition.x, Input.mousePosition.y); var hitInfo = Physics2D.Raycast(_camera.ScreenToWorldPoint(pos), Vector2.zero); // RaycastHit2D can be either true or null, but has an implicit conversion to bool, so we can use it like this if (hitInfo) { HandleTouchOn(hitInfo.transform.gameObject); // Here you can check hitInfo to see which collider has been hit, and act appropriately. } }
public void Back() { SceneManagementUtil.Load(SceneManagementUtil.Scenes.AnaEkran); }
public IEnumerator LoadMainMenu() { yield return(new WaitUntil(() => _ready)); SceneManagementUtil.Load(SceneManagementUtil.Scenes.Izometrik); }
public void GoScene() { SceneManagementUtil.Load(_targetScene); }
private void Enter() { SceneManagementUtil.Load(SceneManagementUtil.Scenes.AnaEkran); }
public void Load(SceneManagementUtil.Scenes scene) { SceneManagementUtil.Load(scene); }