Example #1
0
        protected override void OnCreate()
        {
            Back.SetBackTexture("Menu_CharacterCreation.tga");

            Name = AddTextBox("Name:", "Wähle den Namen deines Charakters.", 150, 15, 200, 45, MoveCursor);
            Name.AllowSymbols = false;

            Character = AddCharacter("", -60, 50, 533, 400);
            Character.SetVisual("HUMANS.MDS");
            Character.SetAdditionalVisuals(HumBodyMeshs.HUM_BODY_BABE0.ToString(), (int)HumBodyTexs.G1Hero, HumHeadMeshs.HUM_HEAD_BABE.ToString(), (int)HumHeadTexs.FaceBabe_B_RedLocks);
            AddButton("Akzeptieren", "Charakteränderungen speichern.", 160, 425, CreateNewCharacter);



            const int offsetX = 415;
            const int offsetY = 27;
            const int dist    = 50;

            bodymesh  = AddChoice("Geschlecht", "Wähle das Geschlecht deines Charakters.", offsetX, offsetY + dist * 0, c_BodyMesh, false, MoveCursor, ChangedVisual);
            bodytex   = AddChoice("Haut", "Wähle die Haut deines Charakters.", offsetX, offsetY + dist * 1, c_BodyTex_M, false, MoveCursor, ChangedVisual);
            headmesh  = AddChoice("Kopf", "Wähle die Kopfform deines Charakters.", offsetX, offsetY + dist * 2, c_HeadMeshes_M, true, MoveCursor, ChangedVisual);
            headtex   = AddChoice("Gesicht", "Wähle das Gesicht deines Charakters.", offsetX, offsetY + dist * 3, c_Faces_M_N, true, MoveCursor, ChangedVisual);
            fatness   = AddChoice("Statur", "Wähle die Statur deines Charakters.", offsetX, offsetY + dist * 4, c_Fatness, false, MoveCursor, ChangedVisual);
            bodywidth = AddChoice("Breite", "Wähle die Körperbreite deines Charakters.", offsetX, offsetY + dist * 6, c_BodyWidth, false, MoveCursor, ChangedVisual);
            voice     = AddChoice("Stimme", "Wähle die Stimme deines Charakters.", offsetX, offsetY + dist * 7, c_Voices_M, true, PlayVoice, PlayVoice);


            ChangedVisual();
        }
Example #2
0
        public MainMenu()
        {
            //Increase the size so we can fit the character model into the menu
            var screenSize = GUCView.GetScreenSize();
            int width      = 900;
            int height     = 600;

            int posX = (screenSize.X - width) / 2;
            int posY = (screenSize.Y - height) / 2;


            Back.SetPos(posX, posY);
            Back.SetSize(width, height);

            AddButton("Welt betreten", "Die Spielwelt mit dem gewählten Character betreten.", 50, () => JoinGameSelected?.Invoke(this));
            AddButton("Charakter wählen", "Wähle deinen Spielcharakter.", 100, () => CharacterSelectionSelected?.Invoke(this));
            AddButton("Charakter erstellen", "Erstelle einen Spielcharakter", 150, () => CharacterCreationSelected?.Invoke(this));
            AddButton("Logout", "Zurück zum Login Menü", 200, () => BackToLoginSelected?.Invoke(this));
            AddButton("Spiel verlassen", "Das Spiel schließen.", 250, () => ExitGameSelected?.Invoke(this));


            _Character = AddCharacter("", 400, 0, 533, 400);
            _Character.SetVisual("HUMANS.MDS");
            _Character.SetAdditionalVisuals(HumBodyMeshs.HUM_BODY_BABE0.ToString(), (int)HumBodyTexs.G1Hero, HumHeadMeshs.HUM_HEAD_BABE.ToString(), (int)HumHeadTexs.FaceBabe_B_RedLocks);
            _Character.Enabled = false;
            _Character.Hide();

            _CharacterNameText = Back.CreateText("PlayerName", 650, 475);
            _CharacterNameText.Hide();
        }
Example #3
0
        protected MainMenuCharacter AddCharacter(string help, int x, int y, int w, int h)
        {
            var c = new MainMenuCharacter(help, pos[0] + x, pos[1] + y, w, h);

            Items.Add(c);
            return(c);
        }
Example #4
0
        public CharacterSelectionMenu()
        {
            Back.CreateTextCenterX("Charakterauswahl", 10);

            _CharacterButtons = new MainMenuButton[5];
            for (int i = 0; i < _CharacterButtons.Length; i++)
            {
                _CharacterButtons[i]         = AddButton("...", "", _DistanceBetweenButtons * (i + 1), OnActivate);
                _CharacterButtons[i].Enabled = false;
            }

            //Increase the size so we can fit the character model into the menu
            var screenSize = GUCView.GetScreenSize();
            int width      = 900;
            int height     = 600;

            int posX = (screenSize.X - width) / 2;
            int posY = (screenSize.Y - height) / 2;


            Back.SetPos(posX, posY);
            Back.SetSize(width, height);


            _CharacterDisplay = AddCharacter("", 400, 0, 533, 400);
            _CharacterDisplay.SetVisual("HUMANS.MDS");
            _CharacterDisplay.SetAdditionalVisuals(HumBodyMeshs.HUM_BODY_BABE0.ToString(), (int)HumBodyTexs.G1Hero, HumHeadMeshs.HUM_HEAD_BABE.ToString(), (int)HumHeadTexs.FaceBabe_B_RedLocks);
            _CharacterDisplay.Enabled = false;
            _CharacterDisplay.Hide();

            _CharacterNameText = Back.CreateText("PlayerName", 650, 475);
            _CharacterNameText.Hide();

            CursorChanged += OnCursorChanged;
        }
Example #5
0
 // Start is called before the first frame update
 void Start()
 {
     spawner   = GameObject.Find("GroundSpawner").GetComponent <MainMenuGroundSpawner>();
     character = GameObject.Find("Player");
     status    = character.GetComponent <MainMenuCharacter>();
     anim      = character.GetComponent <Animator>();
     speed     = 0.05f;
 }
Example #6
0
        protected MainMenuCharacter AddCharacter(int x, int y, int w, int h)
        {
            var c = new MainMenuCharacter("", pos[0] + x, pos[1] + y, w, h);

            c.Enabled = false;
            Items.Add(c);
            return(c);
        }
Example #7
0
    // Start is called before the first frame update
    void Start()
    {
        scene = SceneManager.GetActiveScene().name;

        spawner   = GameObject.Find("BackgroundSpawner").GetComponent <MainMenuBackgroundSpawner>();
        character = GameObject.Find("Player");
        if (scene == "SongSelect")
        {
            status = character.GetComponent <MainMenuCharacter>();
            anim   = character.GetComponent <Animator>();
            speed  = 0.01f;
        }
        else
        {
            speed = 0.002f;
        }
    }