private void Start() { zoneDetection = GetComponentInChildren <ZoneDetection>(); boat = GetComponent <Boat>(); if (boat.Direction().Equals(Vector3.left)) { float pos = zoneDetection.transform.localPosition.x; zoneDetection.transform.localPosition = new Vector3(-pos, transform.position.y, 0f); } zoneDetection.Init(); }
public void Reset() { zoneDetection.Init(); }