示例#1
0
        /// <summary>
        /// Konstruktor
        /// </summary>
        private KinectUi()
        {
            background = new JumpAndRun.Gui.Elements.Point("data/background/farn.jpg");
            background.Position(0, 0, -0.6f);
            background.Scale(1.333f, 1f);

            text = new JumpAndRun.Gui.Elements.TextWithBackground();
            text.setText("Kinect wird gestartet");
            text.Size(44);
            //text.TextColor(0.784f, 0.125f, 0.125f, 1f); // rot
        }
        /// <summary>
        /// Initialisiert das GUI, zeigt sie aber nicht an.
        /// </summary>
        private ButtonTutorialUi()
        {
            // Hintergrund erzeugen
            background = new JumpAndRun.Gui.Elements.Point("data/background/hintergrund.png");
            background.Position(0, 0, -0.4f);
            background.Scale(1.333f, 1f);

            // Text erzeugen
            textTop2 = new JumpAndRun.Gui.Elements.TextWithBackground();
            textTop2.setText("Beweg doch einmal deine");
            textTop2.Position(0, 0.65f);
            textTop2.Color(0.796f, 0.624f, 0.157f, 1f); // kaki
            textTop2.Size(44);

            textTop3 = new JumpAndRun.Gui.Elements.TextWithBackground();
            textTop3.setText("rechte Hand zum Knopf");
            textTop3.Position(0, 0.45f);
            textTop3.Color(0.796f, 0.624f, 0.157f, 1f); // kaki
            textTop3.Size(44);

            textBottom1 = new JumpAndRun.Gui.Elements.TextWithBackground();
            textBottom1.setText("Siehst du wie er rot geworden ist?");
            textBottom1.Position(0, -0.45f);
            textBottom1.Size(36);
            textBottom1.Color(0.784f, 0.125f, 0.125f, 1f); // rot

            textBottom2 = new JumpAndRun.Gui.Elements.TextWithBackground();
            textBottom2.setText("Wenn du gleichzeitig noch deine Hand");
            textBottom2.Position(0, -0.6f);
            textBottom2.Color(0.796f, 0.624f, 0.157f, 1f); // kaki
            textBottom2.Size(36);

            textBottom3 = new JumpAndRun.Gui.Elements.TextWithBackground();
            textBottom3.setText("nach vorne bewegst, klickst du den Knopf");
            textBottom3.Position(0, -0.75f);
            textBottom3.Color(0.796f, 0.624f, 0.157f, 1f); // kaki
            textBottom3.Size(36);

            // Button erzeugen
            button = new Gui.Elements.Button();
            button.Text("Knopf");
            button.EnteredEvent += new Gui.Elements.Button.Entered(ButtonEntered);
            button.ClickEvent += new Gui.Elements.Button.Clicked(ButtonClicked);

            // Cursor
            JumpAndRun.Gui.Elements.Cursor.Instance.MoveEvent += new JumpAndRun.Gui.Elements.Cursor.Move(CursorMove);

            // GUI nicht anzeigen
            Hide();
        }
示例#3
0
        /// <summary>
        /// Initialisiert das GUI, zeigt sie aber nicht an.
        /// </summary>
        private MenuUi()
        {
            // Hintergrund
            background = new JumpAndRun.Gui.Elements.Point("data/background/hintergrund.png");
            background.Position(0, 0, -0.4f);
            background.Scale(1.333f, 1f);

            // Titel
            title = new JumpAndRun.Gui.Elements.TextWithBackground();
            title.setText("Wie anspruchsvoll darfs denn sein?");
            title.Size(40);
            title.Position(0f, 0.8f);

            // Buttons
            buttonEasy = new Gui.Elements.Button();
            buttonEasy.Text("entspannt");
            buttonEasy.Position(0f, 0.3f);
            buttonEasy.ClickEvent += new Gui.Elements.Button.Clicked(ButtonEasyClicked);

            buttonNormal = new Gui.Elements.Button();
            buttonNormal.Text("normal");
            buttonNormal.Position(0f, 0f);
            buttonNormal.ClickEvent += new Gui.Elements.Button.Clicked(ButtonNormalClicked);

            buttonDifficult = new Gui.Elements.Button();
            buttonDifficult.Text("anstrengend");
            buttonDifficult.Position(0f, -0.3f);
            buttonDifficult.ClickEvent += new Gui.Elements.Button.Clicked(ButtonDifficultClicked);

            // Spielname
            gameName = new JumpAndRun.Gui.Elements.TextWithBackground();
            gameName.setText("Dschungel Trainer");
            gameName.Size(52);
            gameName.Position(0f, -0.7f);

            slogan = new JumpAndRun.Gui.Elements.TextWithBackground();
            slogan.setText("spielend fit werden");
            slogan.Size(40);
            slogan.Position(0.2f, -0.9f);

            // Cursor
            //JumpAndRun.Gui.Elements.Cursor.Instance.MoveEvent += new JumpAndRun.Gui.Elements.Cursor.Move(CursorMove); // nur zum testen

            // GUI nicht anzeigen
            Hide();
        }
示例#4
0
        /// <summary>
        /// Initialisiert das GUI, zeigt sie aber nicht an.
        /// </summary>
        private LoadingUi()
        {
            // Hintergrund
            background = new JumpAndRun.Gui.Elements.Point("data/background/ladebildschirm.png");
            background.Position(0, 0, -0.55f);
            background.Scale(1.333f, 1f);

            // Text erzeugen
            text = new JumpAndRun.Gui.Elements.TextWithBackground();
            text.Size(40);
            text.Position(0f, -0.7f);
            text.Color(0.84f, 0.59f, 0.11f, 1f);

            // Button
            button = new JumpAndRun.Gui.Elements.Button();
            button.Text("Start");
            button.Position(0f, 0f);
            button.ClickEvent += new JumpAndRun.Gui.Elements.Button.Clicked(ButtonClicked);

            // GUI nicht anzeigen
            Hide();
        }
示例#5
0
        /// <summary>
        /// Initialisiert das GUI, zeigt sie aber nicht an.
        /// </summary>
        private ScoreUi()
        {
            Score = 0;

            // Hintergrund erzeugen
            background = new JumpAndRun.Gui.Elements.Point("data/background/hintergrund.png");
            background.Position(0, 0, -0.4f);
            background.Scale(1.333f, 1f);

            // Text erzeugen
            gains = new JumpAndRun.Gui.Elements.TextWithBackground();
            gains.setText("Punkte: " + Gains);
            gains.Size(50);
            gains.Position(0, 0.8f);

            penalties = new JumpAndRun.Gui.Elements.TextWithBackground();
            penalties.setText("Abzug: " + Penalties);
            penalties.Size(50);
            penalties.Position(0, 0.6f);

            score = new JumpAndRun.Gui.Elements.TextWithBackground();
            score.setText("Resultat: " + Score);
            score.Size(50);
            score.Position(0, 0.3f);

            // Button erzeugen
            button = new Gui.Elements.Button();
            button.Text("Nochmal");
            button.ClickEvent += new Gui.Elements.Button.Clicked(ButtonClicked);

            // Cursor erzeugen

            /*cursorId = View.Model.AddPoint("data/models/hand/hand-stop-2.jpg");
            while (cursorId != 0 && !View.Model.IsCreated(cursorId)) { }
            View.Model.Scale(cursorId, 0.03f, 0.05f, 1);*/

            // GUI nicht anzeigen
            Hide();
        }
示例#6
0
        /// <summary>
        /// Initialisiert das GUI, zeigt sie aber nicht an.
        /// </summary>
        private NoTrackingUi()
        {
            // Hintergrund erzeugen
            background = new JumpAndRun.Gui.Elements.Point("data/background/hintergrund.png");
            background.Position(0, 0, -0.4f);
            background.Scale(1.333f, 1f);

            // Text erzeugen
            text1 = new JumpAndRun.Gui.Elements.TextWithBackground();
            text1.setText("Ich kann im Moment");
            text1.Size(50);
            text1.Color(0.796f, 0.624f, 0.157f, 1f);
            text1.Position(0f, 0.2f);

            text2 = new JumpAndRun.Gui.Elements.TextWithBackground();
            text2.setText("keine Person erkennen.");
            text2.Size(50);
            text2.Color(0.796f, 0.624f, 0.157f, 1f);
            text2.Position(0f, 0f);

            hint = new JumpAndRun.Gui.Elements.TextWithBackground();
            hint.setText("Stell dich etwa");
            hint.Size(56);
            //hint.Color(0.502f, 0.082f, 0.082f, 1f);
            //hint.Color(0.784f, 0.125f, 0.125f, 1f); // rot
            hint.Position(0f, -0.5f);

            hint2 = new JumpAndRun.Gui.Elements.TextWithBackground();
            hint2.setText("3-5m vor der Kinect hin");
            hint2.Size(56);
            //hint2.Color(0.502f, 0.082f, 0.082f, 1f);
            //hint2.Color(0.784f, 0.125f, 0.125f, 1f); // rot
            hint2.Position(0f, -0.7f);

            // GUI nicht anzeigen
            Hide();
        }