Esempio n. 1
0
        public ResourceProvider()
        {
            FontProvider.Register(this);
            ImageProvider.Register(this);

            font     = new Font("Consolas", 8.75f);
            textures = new Dictionary <string, GsImage>();
            images   = new Dictionary <string, FramedImage>();

            LoadTextures();
            LoadImages();
        }
Esempio n. 2
0
        protected virtual void DrawCurrentLevel(DrawParams dparams, GsRectangle bounds, GsRectangle inside)
        {
            if (Level < MaxLevel)
            {
                float spacing   = 2f;
                float dimension = (bounds.Width - (spacing * 5f)) / 8f;

                float x = bounds.X + spacing;
                float y = bounds.Bottom - (spacing + dimension);

                GsFont font        = FontProvider.PieceLevelFont;
                var    lineSpacing = FontProvider.GetLineSpacing(font);

                string   text = Level.ToString();
                GsVector pos  = new GsVector(bounds.Left + spacing, bounds.Bottom - (lineSpacing + spacing));

                var graphics = dparams.Graphics;
                graphics.DrawString(font, text, pos, GsColor.Black);
            }
        }