Added scene 4-Doggy
This commit is contained in:
@@ -3,24 +3,13 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
public class SwitchToScene : MonoBehaviour, IPointerClickHandler
|
||||
public class SwitchToScene : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private SwitchableScene _scene;
|
||||
|
||||
[SerializeField]
|
||||
private bool _triggerOnClick;
|
||||
|
||||
public void Switch()
|
||||
{
|
||||
SceneSwitcher.Instance.SwitchScene(_scene.index);
|
||||
}
|
||||
|
||||
public void OnPointerClick(PointerEventData eventData)
|
||||
{
|
||||
Debug.Log("Click");
|
||||
|
||||
if (_triggerOnClick)
|
||||
Switch();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user