public override void OnTriggerEnter2D(Collider2D col) { if (!CheckTags(col)) return; moving = col.GetComponent<Moving>(); moving.ActionComplete += OnActionComplete; pathDetermination = col.GetComponent<IPathDetermination>(); }
void Awake() { moving = GetComponent<Moving>(); moving.ActionComplete += OnActionComplete; pathDetermination = GetComponent<IPathDetermination>(); }