예제 #1
0
        public LoopPrincipal(IEtapasLoop loopSteps, int ups, int maxFrameSkips, int noDelaysPerYield) : base()
        {
            if (ups < 1)
            {
                throw new ArgumentException("You must display at least one frame per second!");
            }

            if (ups > 1000)
            {
                ups = 1000;
            }

            this.game = loopSteps;
            this.desiredUpdateTime = 1000000000L / ups;
            this.running           = true;
            this.maxFrameSkips     = maxFrameSkips;
            this.noDelaysPerYield  = noDelaysPerYield;
            this.velocidade        = VEL_INICIAL;
        }
예제 #2
0
 public LoopPrincipal(IEtapasLoop loopSteps)
     : this(loopSteps, DEFAULT_UPS)
 {
 }
예제 #3
0
 public LoopPrincipal(IEtapasLoop loopSteps, int ups)
     : this(loopSteps, ups, DEFAULT_MAX_FRAME_SKIPS, DEFAULT_NO_DELAYS_PER_YIELD)
 {
 }