Example #1
0
    // Init.
    void Start()
    {
        wallDetection = this.GetComponent <DetectWall>();

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