Пример #1
0
        public override void Initialize()
        {
            scores.AddRange(System.IO.File.ReadAllLines("Text/HighScores.txt"));

            OKButton = new Button();
            OKButton.Initialize("Buttons/OK", this.ScreenManager.Kinect, new Vector2(1050, 330));
            buttons.Add(OKButton);
            OKButton.Clicked += new Button.ClickedEventHandler(OKButton_Clicked);

            if (CheckScore(score))
            {
                InitializeButtons();

                text = "                          CONGRATULATIONS ! \n YOU MADE IT INTO TOP 10 ! PLEASE ENTER YOUR NAME :\n\n" +
                       "                         YOUR SCORE IS: " + score;
            }
            else
            {
                text = "                                SORRY ! \n           YOU DID NOT MAKE IT INTO THE TOP 10 \n\n" +
                       "                        YOUR SCORE IS: " + score;
            }


            hand.Initialize(ScreenManager.Kinect);
            base.Initialize();
        }
Пример #2
0
        public override void Initialize()
        {
            textPosition = new Vector2(75, 145);
            textBox      = new Rectangle((int)textPosition.X, (int)textPosition.Y, 1020, 455);
            OkButton.Initialize("Buttons/OK", this.ScreenManager.Kinect, new Vector2(1050, 10));
            OkButton.Clicked += new Button.ClickedEventHandler(OkButton_Clicked);

            Hand.Initialize(ScreenManager.Kinect);
            base.Initialize();
        }
 public override void Initialize()
 {
     showAvatar = true;
     button     = new Button();
     hand       = new HandCursor();
     hand.Initialize(ScreenManager.Kinect);
     button.Initialize("Buttons/OK", this.ScreenManager.Kinect, new Vector2(620, 500));
     button.Clicked += new Button.ClickedEventHandler(button_Clicked);
     avatars         = new Texture2D[4];
     base.Initialize();
 }
 public override void Initialize()
 {
     content      = ScreenManager.Game.Content;
     graphics     = ScreenManager.GraphicsDevice;
     spriteBatch  = ScreenManager.SpriteBatch;
     screenHeight = graphics.Viewport.Height;
     screenWidth  = graphics.Viewport.Width;
     okButton.Initialize("Buttons//exit", ScreenManager.Kinect, new Vector2(screenWidth / 1.5f, screenHeight / 3.5f), 200, 200);
     hand.Initialize(ScreenManager.Kinect);
     base.Initialize();
 }
 public override void Initialize()
 {
     showAvatar = true;
     treadmill  = new Button();
     dumbbell   = new Button();
     Hand       = new HandCursor();
     kinect     = ScreenManager.Kinect;
     Hand.Initialize(ScreenManager.Kinect);
     dumbbell.Clicked  += new Button.ClickedEventHandler(dumbbell_Clicked);
     treadmill.Clicked += new Button.ClickedEventHandler(treadmill_Clicked);
     base.Initialize();
 }
        public override void Initialize()
        {
            index         = 0;
            saveAvailable = true;
            saveButton.Initialize("Buttons/save", ScreenManager.Kinect, new Vector2(1050, 210));
            nextButton.Initialize("Buttons/next", ScreenManager.Kinect, new Vector2(1050, 360));
            saveButton.Clicked += new Button.ClickedEventHandler(saveButton_Clicked);
            nextButton.Clicked += new Button.ClickedEventHandler(nextButton_Clicked);

            hand.Initialize(ScreenManager.Kinect);
            base.Initialize();
        }
Пример #7
0
 public override void Initialize()
 {
     showAvatar  = true;
     enablePause = false;
     button      = new Button();
     hand        = new HandCursor();
     hand.Initialize(ScreenManager.Kinect);
     button.Initialize("Buttons/ok", this.ScreenManager.Kinect, new Vector2(820, 350));
     button.Clicked += new Button.ClickedEventHandler(button_Clicked);
     Text            = "- Welcome to Wundersound, You will see your depth image colored in green if you're \n standing in the kinect's field of view, smile and wave. \n -to switch on an LED say \"One\" or do the swipe up/down gestures. \n - You can also try the joined hands, waveleft and zoom in/out gestures just for the hell of it. \n - Press the Ok button to exit.";
     textPosition    = new Vector2(75, 145);
     textBox         = new Rectangle((int)textPosition.X, (int)textPosition.Y, 1020, 455);
     base.Initialize();
 }
        public override void Initialize()
        {
            showAvatar   = true;
            newGame      = new Button();
            instructions = new Button();
            highscores   = new Button();
            exit         = new Button();
            Hand         = new HandCursor();
            kinect       = ScreenManager.Kinect;
            Hand.Initialize(ScreenManager.Kinect);
            newGame.Clicked      += new Button.ClickedEventHandler(newGame_Clicked);
            instructions.Clicked += new Button.ClickedEventHandler(instructions_Clicked);
            highscores.Clicked   += new Button.ClickedEventHandler(highscores_Clicked);
            exit.Clicked         += new Button.ClickedEventHandler(exit_Clicked);

            base.Initialize();
        }
Пример #9
0
 public override void Initialize()
 {
     showAvatar       = true;
     virusBar         = new Bar(100, 950, 15, 270, 30);
     rightSwordBounds = new Rectangle(0, 400, 80, 80);
     leftSwordBounds  = new Rectangle(1350, 400, 80, 80);
     shields          = new Texture2D[4];
     shieldBounds     = new Rectangle[4];
     shieldBounds[0]  = new Rectangle(590, -80, 80, 80);
     shieldBounds[2]  = new Rectangle(590, 720, 80, 80);
     shieldBounds[1]  = new Rectangle(-90, 500, 80, 80);
     shieldBounds[3]  = new Rectangle(1304, 500, 80, 80);
     cam = new Camera2D(ScreenManager);
     cam.Initialize();
     cam.Focus    = new Vector2(640, 360);
     cam.Position = new Vector2(500.0f, 200.0f);
     button       = new Button();
     hand         = new HandCursor();
     hand.Initialize(ScreenManager.Kinect);
     button.Initialize("Buttons/OK", this.ScreenManager.Kinect, new Vector2(820, 100));
     button.Clicked += new Button.ClickedEventHandler(button_Clicked);
     base.Initialize();
 }