public bool ShrinkAfterReachingSqaure(Direction nextDirection, float amount, out float amountShrunk) { var size = Rect.Size(nextDirection); if (size >= amount) { DoShrink(nextDirection, amount); amountShrunk = amount; return(true); } else { amountShrunk = size; GridObj.OnRemovedFromGrid(); return(false); } }
public void OnCollidedWithSnakeHead(SnakeSegment head) { GridObj.OnRemovedFromGrid(); m_Controller.OnLetterCollected(this, head.OwnerSnake); }