void Unlink() // Unlinks component from industrial tracker and restarts linking process { stopCheck -= UnlinkIfMoving; linkedTracker.UnlinkComponent(this); checkStop = true; Autelia.Coroutines.CoroutineController.StartCoroutine(this, "WaitForStop"); }
void Link() // Saves industrial tracker link and informs tracker of bonus { stopCheck += UnlinkIfMoving; List <IndustrialTracker> surroundingIndustrials = U.ReturnIndustrialTrackers(U.FindNearestBuildings(transform.position, radius)); if (surroundingIndustrials.Count >= 1) { linkedTracker = surroundingIndustrials[0]; if (linkedTracker) { linkedTracker.LinkComponent(this); } } }