Пример #1
0
    /*
     * 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);
        }
    }
Пример #2
0
 private void OnGrab(object sender, Grabbable.GrabData data) => PauseGrowing();