Ejemplo n.º 1
0
 public void DisplayPreviousCanvas()
 {
     if (previousCanvas != null && previousCanvas != currentCanvas)
     {
         DisableAllCanvases();
         previousCanvas.SetActive(true);
         currentCanvas = previousCanvas;
         OnScreenChangeEvent?.Invoke();
     }
 }
Ejemplo n.º 2
0
    public void DisplayCanvas(string canvasName)
    {
        previousCanvas = currentCanvas;
        DisableAllCanvases();
        GameObject target = canvases.Find(i => i.name == canvasName);

        if (target != null)
        {
            target.SetActive(true);
            currentCanvas = target;
            OnScreenChangeEvent?.Invoke();
        }
        else
        {
            Debug.LogError("Couldn't Find Canvas " + canvasName);
        }
    }