Exemplo n.º 1
0
    public override BlockController Controller()
    {
        BlockCube controller = new BlockCube();
        controller.blockName = blockName;
        controller.isSolid = blockIsSolid;
        controller.solidTowardsSameType = solidTowardsSameType;

        TextureCollection[] textureCoordinates = new TextureCollection[6];

        for (int i = 0; i < 6; i++)
        {
            try
            {
                textureCoordinates[i] = Block.index.textureIndex.GetTextureCollection(textures[i]);
            }
            catch
            {
                if (Application.isPlaying)
                    Debug.LogError("Couldn't find texture for " + textures[i]);
            }
        }

        controller.textures = textureCoordinates;

        return controller;
    }
Exemplo n.º 2
0
    public override BlockController Controller()
    {
        BlockCube controller = new BlockCube();

        controller.blockName            = blockName;
        controller.isSolid              = blockIsSolid;
        controller.solidTowardsSameType = solidTowardsSameType;

        TextureCollection[] textureCoordinates = new TextureCollection[6];

        for (int i = 0; i < 6; i++)
        {
            try
            {
                textureCoordinates[i] = Block.index.textureIndex.GetTextureCollection(textures[i]);
            }
            catch
            {
                if (Application.isPlaying)
                {
                    Debug.LogError("Couldn't find texture for " + textures[i]);
                }
            }
        }

        controller.textures = textureCoordinates;

        return(controller);
    }
Exemplo n.º 3
0
    public override BlockController Controller()
    {
        BlockCube controller = new BlockCube();
        controller.blockName = blockName;
        controller.isSolid = blockIsSolid;
        controller.textures = textures;

        return controller;
    }
Exemplo n.º 4
0
    public override BlockController Controller()
    {
        BlockCube controller = new BlockCube();

        controller.blockName = blockName;
        controller.isSolid   = blockIsSolid;
        controller.textures  = textures;

        return(controller);
    }
Exemplo n.º 5
0
    public override BlockController Controller()
    {
        BlockCube controller = new BlockCube();
        controller.blockName = blockName;
        controller.isSolid = blockIsSolid;

        TextureCollection[] textureCoordinates = new TextureCollection[6];

        for (int i = 0; i < 6; i++)
        {
            textureCoordinates[i] = Block.index.textureIndex.GetTextureCollection(textures[i]);
        }

        controller.textures = textureCoordinates;

        return controller;
    }
Exemplo n.º 6
0
    public override BlockController Controller()
    {
        BlockCube controller = new BlockCube();

        controller.blockName            = blockName;
        controller.isSolid              = blockIsSolid;
        controller.solidTowardsSameType = solidTowardsSameType;

        TextureCollection[] textureCoordinates = new TextureCollection[6];

        for (int i = 0; i < 6; i++)
        {
            textureCoordinates[i] = Block.index.textureIndex.GetTextureCollection(textures[i]);
        }

        controller.textures = textureCoordinates;

        return(controller);
    }