Exemplo n.º 1
0
    /// <summary>
    /// To be called if this script is attached to a chessman.
    /// </summary>
    private void HandleChessmen()
    {
        //snap to grid and select sprite
        if (chessman != null)
        {
            //add self to hashset
            allChessmen.Add(gameObject);

            //snap to grid, update sprite and name
            SnapToGrid(chessman);
            chessman.SelectSprite();
            chessman.name = chessman.ToString();
            if (clobberClones)
            {
                HandleDuplicateChessmen();               //let's see if this works.
            }
        }
    }