Exemple #1
0
    private void CreateInfoPane(float x, float y)
    {
        GameObject infoPane = GetGameObject(new Vector3(x, y), "infoPane", Resources.Load <Sprite>(SpritePaths.BigOptionInfoBox));

        FontData font = PD.mostCommonFont.Clone();

        font.scale = 0.06f;
        TextMesh headerText = GetMeshText(new Vector3(x, y + 1.7f), "honk", font);

        font.scale = 0.04f;
        TextMesh infoPaneTextCenter = GetMeshText(new Vector3(x, y + 1.2f), "honk", font);
        TextMesh infoPaneTextLeft   = GetMeshText(new Vector3(x - 1.0f, y + 1.2f), "honk", font);
        TextMesh infoPaneTextRight  = GetMeshText(new Vector3(x + 1.0f, y + 1.2f), "honk", font);

        font.scale = 0.035f;
        TextMesh infoPaneTextFunFact = GetMeshText(new Vector3(x, y + 1.2f), "honk", font);

        navigationArrows = gameObject.AddComponent <OptionsSelector>();
        navigationArrows.Setup(x - 2.35f, y - 1.6f, 0.0f, true);
        navigationArrows.SetWidth(4.7f);
        navigationArrows.UpdatePosition(0);

        soundTest = gameObject.AddComponent <SoundTest>();
        soundTest.Setup(0.7f, 0.6f, infoPane);
        soundTest.ToggleVisibility(false);

        List <XmlNode> bios       = GetFilteredBiosList();
        GameObject     characters = GetGameObject(new Vector3(x - 1.4f, y), "BioChar", null, false, "HUD");
        GameObject     goBack     = GetGoBackImage(x, y);

        writer   = new PlayerDataTextWriter(headerText, infoPaneTextCenter, infoPaneTextLeft, infoPaneTextRight, infoPaneTextFunFact, bios, GetXMLHead(), characters, goBack, PD);
        bioCount = bios.Count - 1;
    }
Exemple #2
0
    public void Start()
    {
        StateControllerInit(false);
        confirmWipe  = false;
        menuPosition = 0;
        controlsPos  = 0;
        ResetOptions(false);

        float x = -2.85f, topy = 0.15f;

        cursor  = GetMenuCursor(1, 4, null, x, topy - 0.6f, 0.0f, 0.3f, 0, 3);
        cursor2 = GetMenuCursor(1, 9, null, 1.9f, -0.8f, 0.0f, 0.2f, 0, 8);

        cursor3 = GetMenuCursor(2, 1, SpritePaths.RightArrows, 0.55f, 1.25f, 1.75f, 0.0f, 0, 0, 1, 2, 1.0f);
        cursor3.Rotate(-90.0f);
        cursor3.SetVisibility(false);

        cursor2Display = gameObject.AddComponent <OptionsSelector>();
        cursor2Display.Setup(1.1f, -0.6f, 0.2f);
        cursor2Display.SetVisibility(false);

        top                = GetXMLHead();
        side_options       = GetButton(x, topy + 0.3f, GetXmlValue(top, "options"), PD.mostCommonFont);
        side_controls      = GetButton(x, topy, GetXmlValue(top, "controls"), PD.mostCommonFont);
        side_accessibility = GetButton(x, topy - 0.3f, GetXmlValue(top, "accessibility"), PD.mostCommonFont);
        side_back          = GetButton(x, topy - 0.6f, GetXmlValue(top, "back"), PD.mostCommonFont);
        sidepanels         = new GameObject[][] { side_back, side_accessibility, side_controls, side_options };
        selectedIdx        = 3;

        CreateInfoPane(0.8f, 0.0f);
    }
    public void Start()
    {
        StateControllerInit();
        PD.sounds.SetVoiceAndPlay(SoundPaths.NarratorPath + "022", 0);
        p1_delay = 0; p2_delay = 0; p1eggState = 0;
        conf1    = false; conf1options = false; conf2 = true;
        int    completionPercent = PD.GetSaveData().CalculateGameCompletionPercent();
        string spPath = SpritePaths.CharSelSheet, crPath = SpritePaths.CharSelCursors;
        int    crNum = 10; dX = 0.71f; initX = -3.2f;

        if (completionPercent == 100)
        {
            spPath = SpritePaths.CharSelSheetAll;
            crPath = SpritePaths.CharSelCursorsAll;
            crNum  = 12;
            initX  = -3.25f;
            dX     = 0.591f;
        }
        else if (completionPercent >= 50)
        {
            spPath = SpritePaths.CharSelSheetWhite;
            crPath = SpritePaths.CharSelCursorsWhite;
            crNum  = 11;
            initX  = -3.21f;
            dX     = 0.6455f;
        }
        charactersel = GetGameObject(new Vector3(0.0f, -0.99f), "Character Select", Resources.Load <Sprite>(spPath), true, "HUD");
        cursor       = GetMenuCursor(crNum, 1, crPath, initX, -0.99f, dX, 0.0f, 0, 0, 1, 0, 0.2f);

        beginSheet = Resources.LoadAll <Sprite>(SpritePaths.ShortButtons);
        begin      = GetGameObject(new Vector3(0.0f, 0.3f), "Begin", beginSheet[0], true, "HUD");
        FontData f   = PD.mostCommonFont.Clone(); f.scale = 0.045f;
        XmlNode  top = GetXMLHead();

        beginText = GetMeshText(new Vector3(0.0f, 0.45f), GetXmlValue(top, "begin"), f).gameObject;

        f.color    = Color.white; f.scale = 0.035f;
        chooseText = GetMeshText(new Vector3(0.0f, 1.11f), GetXmlValue(top, "chooseyourcharacter"), f).gameObject;

        int yMax = InitOptionsTextAndReturnValueCount();

        cursorOp        = GetOptionsCursor(1, yMax + 1, null, -0.2f, 0.45f, 0.0f, 0.25f, 0, yMax, 1);
        cursorOpDisplay = gameObject.AddComponent <OptionsSelector>();
        cursorOpDisplay.Setup(0.2f, 0.45f, 0.25f);
        cursorOpDisplay.SetVisibility(false);
        cursorOpDisplay.SetWidth(PD.gameType == PersistData.GT.Training?0.85f:0.6f);
        InitPlayer1Select();
        SetupBackgrounds();
        ToggleDisplayOptions(false);
        if (PD.gameType == PersistData.GT.Arcade)
        {
            AddVictoryIcons();
        }
        else if (PD.gameType == PersistData.GT.Versus)
        {
            SetupP2StartText(top, f);
            conf2 = false;
        }
    }
 public void UpdateCursorGraphic(OptionsSelector c, int cy)
 {
     c.HideAnArrowIfAtCorner(optionInfos[cy].cval, optionInfos[cy].min, optionInfos[cy].max);
 }