Skip to content

Commit

Permalink
feat(UI): Virtual public functions in JCS_CanvasComp
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Dec 14, 2024
1 parent a7fa492 commit 9f8907f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Assets/JCSUnity/Scripts/UI/JCS_CanvasComp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class JCS_CanvasComp<T> : MonoBehaviour
{
/* Variables */

// The canvas this component to control.
protected JCS_Canvas mCanvas = null;

/* Setter & Getter */
Expand All @@ -22,8 +23,8 @@ protected virtual void Awake()
this.mCanvas = this.GetComponent<JCS_Canvas>();
}

public void Show() => mCanvas.Show();
public void Hide() => mCanvas.Hide();
public void ToggleVisibility() => mCanvas.ToggleVisibility();
public virtual void Show() => mCanvas.Show();
public virtual void Hide() => mCanvas.Hide();
public virtual void ToggleVisibility() => mCanvas.ToggleVisibility();
}
}

0 comments on commit 9f8907f

Please sign in to comment.