예제 #1
0
        private void RenderCrossHair()
        {
            t.ResetTransformation();
            t.StartDrawingLines();
            Vector4 c      = new Vector4(1, 1, 1, 1);
            Vector4 center = new Vector4(TheGame.Instance.Width / 2, TheGame.Instance.Height / 2, 0, 1);
            float   size   = 15;

            t.AddVertexWithColor(new Vector4(center.X - size, center.Y, 0, 1), c);
            t.AddVertexWithColor(new Vector4(center.X + size, center.Y, 0, 1), c);
            t.AddVertexWithColor(new Vector4(center.X, center.Y - size, 0, 1), c);
            t.AddVertexWithColor(new Vector4(center.X, center.Y + size, 0, 1), c);
            t.Draw();
        }