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;
    }
    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;
        }
    }
Exemple #3
0
 private void ChangeCursor2Details(float x = 0.0f)
 {
     if (menuPosition == 2)
     {
         cursor2.setWidthAndHeight(1, 12);
         cursor2Display.ChangeParams(x - 0.25f, -1.4f, 0.2f);
         cursor2Display.SetWidth(0.0f);
     }
     else
     {
         cursor2.setWidthAndHeight(1, 9);
         cursor2Display.ChangeParams(1.1f, -0.6f, 0.2f);
     }
 }