Beispiel #1
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>
        protected override void Initialize()
        {
            //KinectSensor.KinectSensors.StatusChanged += new EventHandler<StatusChangedEventArgs>(KinectSensors_StatusChanged);
            //DiscoverKinectSensor();

            MyGameControl = new GameControl(new Vector2(graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight));
            HUD1 = new Hud(new Vector2(0, 460), "ScreenLayout\\HUD1_52313");
            SettingsButton = new Sprite(new Vector2(graphics.PreferredBackBufferWidth - 100, 0), "Menu\\SettingsMenuButton");
            CursorRight = new AnimatedSprite(16/1.2, 16, Vector2.Zero, "ScreenPointers\\AnimatedCursor16");
            CurrentRoom = new Room(4, 1);//(new Vector2(120, 30), "Rooms\\" + MyGameControl.MyMap.getPlayerRoom().ChamberNumber + "-" + MyGameControl.MyMap.getPlayerRoom().RoomNumber);
            CurrentRoom.setIsPitted(true);
            MyGameControl.MyMap.setPlayerRoom(CurrentRoom);
            BG = new Sprite(Vector2.Zero, "ScreenLayout\\BackdropSpace");
            MyMenu = new Menu(Vector2.Zero, "ScreenLayout\\BackdropSpace");

            MyWatch.Reset();

            base.Initialize();
        }
Beispiel #2
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>
        protected override void Initialize()
        {
            //KinectSensor.KinectSensors.StatusChanged += new EventHandler<StatusChangedEventArgs>(KinectSensors_StatusChanged);
            //DiscoverKinectSensor();

            MyGameControl = new GameControl(new Vector2(graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight));
            HUD1 = new Hud(new Vector2(0, 460), "ScreenLayout\\HUD1_52313");
            SettingsButton = new Sprite(Vector2.Zero, "Menu\\SettingsMenuButton");
            Arrows = new Sprite(new Vector2(0, 460 - 50), "Arrows\\ArrowButton2");
            Move = new Sprite(new Vector2(0, 460 - 250), "Arrows\\MoveButton");
            Skip = new Sprite(new Vector2(0, 0), "Skip");
            CursorRight = new AnimatedSprite(16/1.2, 16, Vector2.Zero, "ScreenPointers\\AnimatedCursor16");
            CursorLeft = new AnimatedSprite(16 / 1.2, 16, Vector2.Zero, "ScreenPointers\\AnimatedCursor16");
            Story = new Sprite();

            MyGameControl.RandomizeRoom('p');
            MyGameControl.StartingRoom = MyGameControl.MyMap.getPlayerRoom();
            CurrentRoom = MyGameControl.StartingRoom;//(new Vector2(120, 30), "Rooms\\" + MyGameControl.MyMap.getPlayerRoom().ChamberNumber + "-" + MyGameControl.MyMap.getPlayerRoom().RoomNumber);
            //CurrentRoom.setIsPitted(true);

            MyGameControl.RandomizeRoom('w');

            MyGameControl.MyMap.setPlayerRoom(CurrentRoom);
            BG = new Sprite(Vector2.Zero, "ScreenLayout\\BackdropSpace");
            MyMenu = new Menu(Vector2.Zero, "ScreenLayout\\BackdropSpace");

            MyWatch.Reset();
            HighScoresBG = new Sprite(MyGameControl.StartingRoom.Position, "Rooms\\Room2");

            base.Initialize();
        }
Beispiel #3
0
 private void button2_Click(object sender, EventArgs e)
 {
     gameControl = new GameControl();
     MessageBox.Show("The game control class has been constructed!");
     ConstructorButton.Enabled = false;
 }
Beispiel #4
0
 // start game
 private void btnStart_Click(object sender, EventArgs e)
 {
     pnNameInput.BringToFront();
     gc = new GameControl();
 }
Beispiel #5
0
 private void ConstructorButton_Click(object sender, EventArgs e)
 {
     _GameControl = new GameControl();
 }