예제 #1
0
 override public void Initialize()
 {
     content          = ScreenManager.getManager();
     device           = ScreenManager.getDevice();
     XboxcurrentState = GamePad.GetState(PlayerIndex.One);
     XboxoldState     = GamePad.GetState(PlayerIndex.One);
     currentState     = Keyboard.GetState();
     oldState         = Keyboard.GetState();
     Sound.playSoundOnce("Sound\\victory", content);
     GamePlayScreen.getScores(level, out numberOfEntries, out names, out scores, out datesInMillis);
     int[] oldScores = new int[scores.Length];
     Array.Copy(scores, oldScores, scores.Length);
     Array.Sort <int, string>(scores, names, null);
     scores = oldScores;
     Array.Sort <int, long>(scores, datesInMillis, null);
     Array.Reverse(scores);
     Array.Reverse(names);
     Array.Reverse(datesInMillis);
     Console.WriteLine("NOW=" + Ticks);
     for (int i = 0; i < numberOfEntries; i++)
     {
         if (Math.Abs(datesInMillis[i] - Ticks) < 1000)
         {
             yourScore = i;
             Console.WriteLine(names[i] + " | " + scores[i] + " | " + datesInMillis[i] + "*");
         }
         else
         {
             Console.WriteLine(names[i] + " | " + scores[i] + " | " + datesInMillis[i]);
         }
     }
 }
예제 #2
0
 override public void Initialize()
 {
     content          = ScreenManager.getManager();
     device           = ScreenManager.getDevice();
     XboxcurrentState = GamePad.GetState(PlayerIndex.One);
     XboxoldState     = GamePad.GetState(PlayerIndex.One);
     currentState     = Keyboard.GetState();
     oldState         = Keyboard.GetState();
 }
예제 #3
0
 public override void Initialize()
 {
     content = ScreenManager.getManager();
     device  = ScreenManager.getDevice();
     currentKeyboardState = Keyboard.GetState();
     oldKeyboardState     = Keyboard.GetState();
     textString           = "";
     base.Initialize();
 }
예제 #4
0
 /// <summary>
 /// Allows the game to perform any initialization it needs to before starting to run.
 /// This is where it can query for any required services and load any non-graphic
 /// related content.  Calling base.Initialize will enumerate through any components
 /// and initialize them as well.
 /// </summary>
 override public void Initialize()
 {
     content = ScreenManager.getManager();
     device  = ScreenManager.getDevice();
     //connect();
 }