Пример #1
0
 public void Back()
 {
     if (FindObjectOfType <MusicManager>())
     {
         FindObjectOfType <MusicManager>().GetComponent <AudioSource>().Stop();
     }
     SceneManagementUtil.Load(SceneManagementUtil.Scenes.Izometrik);
 }
Пример #2
0
 public void Back()
 {
     if (FindObjectOfType <MusicManager>())
     {
         FindObjectOfType <MusicManager>().GetComponent <AudioSource>().Play();
     }
     if (FindObjectOfType <DesertMusicManager>())
     {
         FindObjectOfType <DesertMusicManager>().GetComponent <AudioSource>().Play();
     }
     SceneManagementUtil.Load(SceneManagementUtil.Scenes.AnaEkran);
 }
Пример #3
0
    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.
        }
    }
Пример #4
0
 public void Back()
 {
     SceneManagementUtil.Load(SceneManagementUtil.Scenes.AnaEkran);
 }
Пример #5
0
    public IEnumerator LoadMainMenu()
    {
        yield return(new WaitUntil(() => _ready));

        SceneManagementUtil.Load(SceneManagementUtil.Scenes.Izometrik);
    }
Пример #6
0
 public void GoScene()
 {
     SceneManagementUtil.Load(_targetScene);
 }
Пример #7
0
 private void Enter()
 {
     SceneManagementUtil.Load(SceneManagementUtil.Scenes.AnaEkran);
 }
Пример #8
0
 public void Load(SceneManagementUtil.Scenes scene)
 {
     SceneManagementUtil.Load(scene);
 }