コード例 #1
0
ファイル: Movement.cs プロジェクト: ETdoFresh/FarFetchedUnity
 private void OnValidate()
 {
     if (!rigidbody2D)
     {
         rigidbody2D = GetComponent <Rigidbody2D>();
     }
     if (!checkGrounded)
     {
         checkGrounded = GetComponent <CheckGrounded>();
     }
 }
コード例 #2
0
ファイル: NewCaz2.cs プロジェクト: miragias/car_game_ptixiaki
 // Get the Rigidbody
 void Start()
 {
     script = GetComponent <CheckGrounded>();
     rb     = GetComponent <Rigidbody>();
 }