コード例 #1
0
    // Init.
    void Start()
    {
        wallDetection = this.GetComponent <DetectWall>();

        rigidBody = this.GetComponent <Rigidbody>();
    }
コード例 #2
0
 // Start is called before the first frame update
 void Start()
 {
     rb             = GetComponent <Rigidbody2D>();
     spriteRenderer = GetComponent <SpriteRenderer>();
     wall           = GetComponentInChildren <DetectWall>();
 }