File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,12 @@ protected virtual void Awake()
5353 DetectColliderOnce ( ) ;
5454 }
5555
56+ /// <summary>
57+ /// Identify the current collider type once.
58+ /// </summary>
59+ /// <returns>
60+ /// Type of the current collider.
61+ /// </returns>
5662 public JCS_ColliderType DetectColliderOnce ( )
5763 {
5864 this . mCharacterController = this . GetComponent < CharacterController > ( ) ;
@@ -74,6 +80,19 @@ public JCS_ColliderType DetectColliderOnce()
7480 return this . mColliderType ;
7581 }
7682
83+ /// <summary>
84+ /// Check if TYPE current collider type.
85+ /// </summary>
86+ /// <param name="type"> Collider type you want to confirm. </param>
87+ /// <returns>
88+ /// Return true, if TYPE is this collider type.
89+ /// Return false, if TYPE isn't this collider type.
90+ /// </returns>
91+ public bool IsColliderType ( JCS_ColliderType type )
92+ {
93+ return this . mColliderType == type ;
94+ }
95+
7796 public Vector3 center
7897 {
7998 get
You can’t perform that action at this time.
0 commit comments