Пример #1
0
 private void OnValidate()
 {
     if (!rigidbody2D)
     {
         rigidbody2D = GetComponent <Rigidbody2D>();
     }
     if (!checkGrounded)
     {
         checkGrounded = GetComponent <CheckGrounded>();
     }
 }
Пример #2
0
 // Get the Rigidbody
 void Start()
 {
     script = GetComponent <CheckGrounded>();
     rb     = GetComponent <Rigidbody>();
 }