/// <summary> /// Initialisiert das GUI, zeigt sie aber nicht an. /// </summary> private GameOverUi() { // 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 text = new JumpAndRun.Gui.Elements.TextWithBackground(); text.setText("Game over!"); text.Position(0, 0.5f); // 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(); }
/// <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(); }
/// <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(); }
/// <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(); }