Exemple #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;
    }
Exemple #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);
    }
    public override BlockController Controller()
    {
        BlockCube controller = new BlockCube();
        controller.blockName = blockName;
        controller.isSolid = blockIsSolid;
        controller.textures = textures;

        return controller;
    }
Exemple #4
0
    public override BlockController Controller()
    {
        BlockCube controller = new BlockCube();

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

        return(controller);
    }
    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;
    }
Exemple #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);
    }