/* * Uproots an existing carrot of the grid */ private void UprootCarrot(object source, Grabbable.GrabData data) { if (source is Grabbable gb) { CarrotController carrot = gb.GetComponent <CarrotController>(); if (!carrot) { return; } if (!_carrots.ContainsKey(data.Cell)) { return; } _carrots.Remove(data.Cell); } }
private void OnGrab(object sender, Grabbable.GrabData data) => PauseGrowing();