示例#1
0
 public void DisplayPreviousCanvas()
 {
     if (previousCanvas != null && previousCanvas != currentCanvas)
     {
         DisableAllCanvases();
         previousCanvas.SetActive(true);
         currentCanvas = previousCanvas;
         OnScreenChangeEvent?.Invoke();
     }
 }
示例#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);
        }
    }