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

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

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

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