Example #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();
        }
Example #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();
        }
Example #3
0
 /// <summary>
 /// Kinect functions: to animate the circle around the cursor to demonstrate the time it hovers.
 /// </summary>
 /// <param name="Cursor">Which cursor to animate.</param>
 /// <param name="gameTime">Game Time.</param>
 private void AnimateCursor(AnimatedSprite Cursor, GameTime gameTime)
 {
     isAnimated = true;
     Cursor.UpdateFrame((float)(gameTime.ElapsedGameTime.TotalSeconds));
 }
Example #4
0
 private void StopAnimateCursor(AnimatedSprite Cursor)
 {
     Cursor.FrameNumber = 1;
     isAnimated = false;
 }