public override void Initialize()
 {
     Score     = 0;
     scoreText = new MovingText(Game, "Fonts/regularfont", "Score: 0", new Vector2(Game.GraphicsDevice.Viewport.Width / 2 + 200, 10), Color.White);
     Game.Services.GetService <GameplayScene>().SceneComponents.Add(scoreText);
     Game.Components.Add(scoreText);
     base.Initialize();
 }
示例#2
0
 public override void Initialize()
 {
     countdown     = new BaseSound(Game, "Sounds/1");
     RemainingTime = TIMER_MAX_TIME;
     timerText     = new MovingText(Game, "Fonts/regularfont", $"{RemainingTime}", new Vector2(Game.GraphicsDevice.Viewport.Width / 2, 10), Color.White);
     Game.Services.GetService <GameplayScene>().SceneComponents.Add(timerText);
     Game.Components.Add(timerText);
     base.Initialize();
 }