Exemplo n.º 1
0
 public bool Elapsed(TickCount storedTick, int interval)
 {
     if (storedTick != null) {
         return Elapsed(storedTick.Tick, interval);
     } else {
         return true;
     }
 }
Exemplo n.º 2
0
 public bool Elapsed(TickCount storedTick, int interval)
 {
     if (storedTick != null)
     {
         return(Elapsed(storedTick.Tick, interval));
     }
     else
     {
         return(true);
     }
 }
Exemplo n.º 3
0
        public MapChangeInfoOverlay(string mapName, int minDisplayTime)
        {
            disposed = false;

            this.mapName = mapName;
            textFont = FontManager.LoadFont("PMDCP", 36);
            buffer = new Surface(20 * Constants.TILE_WIDTH, 15 * Constants.TILE_HEIGHT);
            buffer.Fill(Color.Black);
            Surface textSurf = TextRenderer.RenderTextBasic(textFont, mapName, null, Color.WhiteSmoke, false, 0, 0, 0, 0);
            buffer.Blit(textSurf, new Point(DrawingSupport.GetCenterX(buffer.Width, textSurf.Width), 100));
            this.minDisplayTime = minDisplayTime;
            tickCount = new TickCount(SdlDotNet.Core.Timer.TicksElapsed);
            //TextRenderer.RenderText(buffer, textFont, mapName, Color.WhiteSmoke, true, 0, 0, 100, 50);
            //for (int x = 0; x < 20; x++) {
            //    for (int y = 0; y < 15; y++) {

            //        buffer.Blit(GraphicsManager.Tiles[10][59 + (x % 2) + 2 * (y % 2)], new Point(x * Constants.TILE_WIDTH, y * Constants.TILE_HEIGHT));
            //    }
            //}
            //buffer.AlphaBlending = true;
            //buffer.Alpha = 50;
        }