コード例 #1
0
    public void SetBlock()
    {
        int r = Random.Range(0, 10);

        //TODO: Create a random reverse generator that deals reverse positions
        if (type == BlockData.blockType.reverse)
        {
            BlockData.ChangeBlockType(ref type, BlockSprites);
        }
        else if (r < 2)
        {
            BlockData.ChangeBlockType(ref type, BlockSprites);
        }

        foreach (SpriteRenderer sr in BlockSprites)
        {
            sr.material.SetFloat("_OutlineSize", 1);
        }
        outlineSize = BlockSprites[0].material.GetFloat("_OutlineSize");

        isShined = false;
    }