public override void draw(GraphicsDevice device, Effect effect, DisplayParameters parameters) { AnimatedBodyPartGroup block = new AnimatedBodyPartGroup(ContentDistributor.getEmptyString() + @"worldMarkup\" + markerName + ".chr", 1.0f / 7.0f); block.setScale(1f / 12f); foreach (BlockLoc test in blocksToBuild.Keys) { //WorldMarkupHandler.addCharacter(ContentDistributor.getEmptyString()+@"worldMarkup\"+markerName+".chr", // test.toWorldSpaceVector3() + new Vector3(.5f, .5f, .5f), 1.0f/12.0f,.6f); block.setRootPartLocation(test.toWorldSpaceVector3() + new Vector3(.5f, .5f, .5f)); effect.Parameters["xOpacity"].SetValue(.7f); effect.Parameters["xTint"].SetValue(ColorPallete.getColorFromByte(blocksToBuild[test]).ToVector4() * 1.2f); block.draw(device, effect); effect.Parameters["xTint"].SetValue(Color.White.ToVector4()); effect.Parameters["xOpacity"].SetValue(1f); } }
private static void AddVertexToVertices(int x, int y, int z, ref VertexPostitionColorPaintNormal[] vertices, ref int verticesSoFar, cornr2AOArrLc corner, ref Vector3 normal, ref byte[] AOarray, byte type, int modelOffsetX, int modelOffsetY, int modelOffsetZ) { VertexPostitionColorPaintNormal Zero = new VertexPostitionColorPaintNormal(); Zero.Position = new Vector3(x + xOffSetsAtCorners[(int)corner], y + yOffSetsAtCorners[(int)corner], z + zOffSetsAtCorners[(int)corner]); Zero.Normal = normal; // NoiseGenerator.Amplitude=2; //float simplex = (float)NoiseGenerator.Noise(x, z)+1; //Zero.PaintColor = new Color((int)(simplex * 255), (int)(simplex * 255), (int)(simplex * 255)); //Random rand = new Random(1+(x + xOffSetsAtCorners[(int)corner]+modelOffsetX) // * (y + yOffSetsAtCorners[(int)corner]+modelOffsetY) // * ( z + zOffSetsAtCorners[(int)corner]+modelOffsetZ)); //Zero.PaintColor = new Color( UIColorPallete.colorArray[type].R + rand.Next(-3,3),UIColorPallete.colorArray[type].G + rand.Next(-3,3),UIColorPallete.colorArray[type].B + rand.Next(-3,3)); Zero.PaintColor = new Color(ColorPallete.getColorFromByte(type).R, ColorPallete.getColorFromByte(type).G, ColorPallete.getColorFromByte(type).B); Zero.Color.R = AOarray[(int)corner]; vertices[verticesSoFar] = Zero; verticesSoFar++; }
private void addColorButton(Vector2 loc, byte color) { children.Add(new UIElement(new ColorSelection(color), getColorSwatchBox(), loc, 1, ColorPallete.getColorFromByte(color), ColorPallete.getColorFromByte(color), "Select color")); }