Example #1
0
    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);
        }
    }
Example #2
0
 public void OnCollidedWithSnakeHead(SnakeSegment head)
 {
     GridObj.OnRemovedFromGrid();
     m_Controller.OnLetterCollected(this, head.OwnerSnake);
 }