示例#1
0
        public Lobby()
        {
            footer = new Footer();

              setupInput();
              setupBackground();

              // Customer Queue Positions
              theQueue = new Queue(QUEUE_START, QUEUE_SPOTS, QUEUE_WIDTH);

              // Setup all the events
              setEventHandlers();

              // Add Scientist
              Point scientistStart = new Point(1080, 430);      // TEMP VALUE
              Point scientistDestination = new Point(886, 430); // TEMP VALUE
              addScientist(new Scientist(scientistStart, scientistDestination));

              // Add Teleport
              ActiveObjects.Add(new Teleport(new Point(100, 400)));

              // TODO: Add Cash Register
              // TODO: Add Entry Door

              // TODO: Add AddClient Timer
              TimerCallback addClientCallback = Game1.Events.addClient;
              addClientTimer = new Timer(TimeSpan.Zero, TimeSpan.FromMilliseconds(3000), addClientCallback);
        }
 public StoryMode(Texture2D[] frames)
 {
     TimerCallback callback = nextImageForTimer;
       this.frames = frames;
       this.currentImage = 0;
       this.timer = new Timer(TimeSpan.Zero, TimeSpan.FromSeconds(5), callback);
       this.lastKeydown = TimeSpan.Zero;
       this.keypressLimit = TimeSpan.FromMilliseconds(500);
       this.lastKeyboardState = Keyboard.GetState();
 }