Exemplo n.º 1
0
    public void SetBlock(string typeName)
    {
        BlockShape shape = BlockShape.Find(typeName);

        if (shape == null)
        {
            return;
        }

        this.transform.rotation = Quaternion.identity;
        BlockGroup layer = new BlockGroup();

        layer.AddBlock(new Block(Vector3.zero, BlockDirection.Zplus, shape));
        layer.UpdateMesh();
        this.guide.SetMesh(layer.GetSurfaceMesh(), layer.GetWireMesh());
        this.guide.transform.localPosition = Vector3.zero;
        this.guide.transform.localScale    = Vector3.one;
    }
Exemplo n.º 2
0
 public static void blk_drawGhost(BlockGroup blkG, int col, int row)
 {
     blkG.AddBlock(GraphicDefs.ght_draw(blkG.GetField()).Move(blkG.GetLocation().x + col + ((blkG.GetLocation().y - row) * blkG.GetField().GetDimentions().width)));
 }