void Awake() { rectDetector = GetComponent <RectDetector>(); switchComponent = GetComponent <Switch>(); _Subscribe_Events(); }
void Awake() { timer = GetComponent <Timer>(); rectDetector = GetComponent <RectDetector>(); moveAgent = GetComponent <MoveAgent>(); _Subscribe_Events(); }
void Awake() { rectDetector = GetComponent <RectDetector>(); if (rectDetector) { rectDetector.OnEnter += _OnEnter; } }