File tree Expand file tree Collapse file tree 3 files changed +31
-25
lines changed
Assets/JCSUnity/Scripts/UI Expand file tree Collapse file tree 3 files changed +31
-25
lines changed Original file line number Diff line number Diff line change 1111
1212namespace JCSUnity
1313{
14- /// <summary>
15- /// Component that requires the component `JCS_Canvas` without
16- /// actually inherit the class `JCS_Canvas`.
17- /// </summary>
18- [ RequireComponent ( typeof ( JCS_Canvas ) ) ]
19- public class JCS_CanvasComp < T > : MonoBehaviour
20- {
21- /* Variables */
22-
23- protected JCS_Canvas mCanvas = null ;
24-
25- /* Setter & Getter */
26-
27- /* Functions */
28-
29- protected virtual void Awake ( )
30- {
31- this . mCanvas = this . GetComponent < JCS_Canvas > ( ) ;
32- }
33-
34- public void Show ( ) => mCanvas . Show ( ) ;
35- public void Hide ( ) => mCanvas . Hide ( ) ;
36- public void ToggleVisibility ( ) => mCanvas . ToggleVisibility ( ) ;
37- }
38-
3914 /// <summary>
4015 /// Control of the canvas component.
4116 /// </summary>
Original file line number Diff line number Diff line change 1+ using UnityEngine ;
2+
3+ namespace JCSUnity
4+ {
5+ /// <summary>
6+ /// Component that requires the component `JCS_Canvas` without
7+ /// actually inherit the class `JCS_Canvas`.
8+ /// </summary>
9+ [ RequireComponent ( typeof ( JCS_Canvas ) ) ]
10+ public class JCS_CanvasComp < T > : MonoBehaviour
11+ {
12+ /* Variables */
13+
14+ protected JCS_Canvas mCanvas = null ;
15+
16+ /* Setter & Getter */
17+
18+ /* Functions */
19+
20+ protected virtual void Awake ( )
21+ {
22+ this . mCanvas = this . GetComponent < JCS_Canvas > ( ) ;
23+ }
24+
25+ public void Show ( ) => mCanvas . Show ( ) ;
26+ public void Hide ( ) => mCanvas . Hide ( ) ;
27+ public void ToggleVisibility ( ) => mCanvas . ToggleVisibility ( ) ;
28+ }
29+ }
You can’t perform that action at this time.
0 commit comments