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