Ejemplo n.º 1
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="setID">childIndex</param>
 /// <param name="setName">名称</param>
 /// <param name="setColor">颜色</param>
 public BlockDefinition(byte setID, string setName, Color setColor)
 {
     this.id             = setID;
     this.name           = setName;
     this.color          = setColor;
     this.meshCreateMode = MeshCreateMode.Color;
 }
Ejemplo n.º 2
0
        //上面是A,下面是B,前面是C,其他面是D的方块
        //        public BlockDefinition(byte childIndex, string name, byte textureFrontX, byte textureFrontY, byte textureX, byte textureY,
        //            byte textureTopX, byte textureTopY, byte textureBottomX, byte textureBottomY)
        //            : this(childIndex, name, textureFrontX, textureFrontY, textureX, textureY, textureX, textureY, textureX, textureY,
        //                textureTopX, textureTopY, textureBottomX, textureBottomY)
        //        {
        //        }

        //上下左右前后面都不一样的方块
        public BlockDefinition(byte id, string name, Sprite setTop, Sprite setBottom, Sprite setFront,
                               Sprite setBack, Sprite setLeft, Sprite setRight)
        {
            this.id             = id;
            this.name           = name;
            this.meshCreateMode = MeshCreateMode.Texture;
            this.texCreateMode  = TextureCreateMode.OneTex;
            this.top            = setTop;
            this.bottom         = setBottom;
            this.front          = setFront;
            this.back           = setBack;
            this.left           = setLeft;
            this.right          = setRight;
        }