コード例 #1
0
    bool CheckIsValidPosition()
    {
        foreach (Transform b in block.transform)
        {
            Vector2 pos = tetManager.Round(b.transform.position);

            if (tetManager.CheckIsInside(pos) == false)
            {
                return(false);
            }

            if (tetManager.GetTransformAtMapPosition(pos) != null && tetManager.GetTransformAtMapPosition(pos).parent != block.transform)
            {
                return(false);
            }
        }

        return(true);
    }