Exemplo n.º 1
0
 public GameScreen(BlackNectarGame game)
 {
     this.game = game;
     starField = new StarField();
     starField.Initialize(game, StarField.StarCount);
     fadeRect = new Rectangle();
     fadeRect.Fill = new SolidColorBrush(Colors.Black);
     fadeRect.Width = game.Width;
     fadeRect.Height = game.Height;
     fadeRect.Opacity = 0.0f;
     fadeTransform = new TranslateTransform();
     fadeTransform.X = 0;
     fadeTransform.Y = 0;
 }
Exemplo n.º 2
0
 public GameScreen(BlackNectarGame game)
 {
     this.game = game;
     starField = new StarField();
     starField.Initialize(game, StarField.StarCount);
     fadeRect         = new Rectangle();
     fadeRect.Fill    = new SolidColorBrush(Colors.Black);
     fadeRect.Width   = game.Width;
     fadeRect.Height  = game.Height;
     fadeRect.Opacity = 0.0f;
     fadeTransform    = new TranslateTransform();
     fadeTransform.X  = 0;
     fadeTransform.Y  = 0;
 }
Exemplo n.º 3
0
 public TitleScreen(BlackNectarGame game)
 {
     this.game = game;
     starField = new StarField();
     starField.Initialize(game, StarField.StarCount);
     blinkTimer           = new PeriodicTimer();
     blinkTimer.OnChange += () =>
     {
         // Every second blink for a half second
         blink = !blink;
         if (!blink)
         {
             blinkTimer.Period = BlinkOnPeriod;
         }
         else
         {
             blinkTimer.Period = BlinkOffPeriod;
         }
     };
 }
Exemplo n.º 4
0
 public TitleScreen(BlackNectarGame game)
 {
     this.game = game;
     starField = new StarField();
     starField.Initialize(game, StarField.StarCount);
     blinkTimer = new PeriodicTimer();
     blinkTimer.OnChange += () =>
         {
             // Every second blink for a half second
             blink = !blink;
             if (!blink)
             {
                 blinkTimer.Period = BlinkOnPeriod;
             }
             else
             {
                 blinkTimer.Period = BlinkOffPeriod;
             }
         };
 }