예제 #1
0
        public void RenderView(Matrix4 VP, Scene s)
        {
            blade.RenderBlade(VP, Pos.X, Pos.Y - (diamond < 0?-0.6f:blade.Type.Points[diamond] * blade.Type.MeshScale), height, Util.PI / 2, heat, GetEyePos());

            BasicShader shader = BasicShader.Instance;

            shader.Bind();
            Matrix4 modelspace = Matrix4.CreateTranslation(0, 1, 0) * Matrix4.CreateRotationX(-hammerMove) * Matrix4.CreateTranslation(0, 2.5f + hammerY * hammerMove / 4, 0) * Matrix4.CreateRotationX(0.9f - hammerMove) *
                                 Matrix4.CreateRotationZ(0.7f + hammerX * hammerMove / 4) * Matrix4.CreateTranslation(1.9f, -2.4f, height + 1) * Modelspace;

            shader.SetMVP(modelspace * VP);
            shader.SetModelspaceMatrix(modelspace);
            shader.ResetColor();
            hammer.Draw();

            OrthoRenderEngine.DrawExtendedColoredTexturedBox(TextureCollection.DialogBG, Util.White, 50, 50, 250, 250);
            OrthoRenderEngine.DrawColoredMesh(table.Mesh, projection, Util.White, 50, 50, 250, 250);
            OrthoRenderEngine.DrawColoredMesh(table.Coal, projection, Util.White, 50, 50, 250, 250);
        }
예제 #2
0
 public void RenderView(Matrix4 VP, Scene s)
 {
     blade.RenderBlade(VP, Pos.X + (diamond < 0?-0.6f:blade.Type.Points[diamond] * blade.Type.MeshScale), Pos.Y, height, Util.PI, heat, GetEyePos());
     OrthoRenderEngine.DrawExtendedColoredTexturedBox(TextureCollection.DialogBG, Util.White, OrthoRenderEngine.GetCanvasWidth() - 300, 50, 250, 250);
     OrthoRenderEngine.DrawColoredMesh(anvil.Mesh, projection, Util.White, OrthoRenderEngine.GetCanvasWidth() - 300, 50, 250, 250);
 }
예제 #3
0
 public override void RenderItem(float x, float y, float width, float height)
 {
     OrthoRenderEngine.DrawColoredMesh(MeshCollection.Ingot, ItemMatrix, Metal.Color, x + 4, y + 4, width - 8, height - 8);
 }
예제 #4
0
 public override void RenderItem(float x, float y, float width, float height)
 {
     OrthoRenderEngine.DrawColoredMesh(Info.Mesh, Info.ItemMatrix, Info.Color, x + 4, y + 4, width - 8, height - 8);
 }