Exemple #1
0
        override public void Draw(double x)
        {
            double         lineDiff     = parent.LineDiff;
            float          y            = (float)parent.Viewport.RateToRelativeY(parent.NoteToY(Note.getKey()));
            Line2DRenderer lineRenderer = Line2DRenderer.GetInstance();

            parent.SpriteBatch.Draw(
                texture[(int)Note.Type],
                new Vector2((float)x, y),
                null,
                Color.White,
                0f,
                origin[(int)Note.Type],
                getScale(lineDiff),
                SpriteEffects.None,
                0f);
        }
Exemple #2
0
 static public Line2DRenderer InitializeInstance(ContentManager content)
 {
     return(instance = new Line2DRenderer(content));
 }
Exemple #3
0
 /// <summary>
 /// LoadContent will be called once per game and is the place to load
 /// all of your content.
 /// </summary>
 protected override void LoadContent()
 {
     // Create a new SpriteBatch, which can be used to draw textures.
     Line2DRenderer.InitializeInstance(Content);
 }