Beispiel #1
0
    /// <summary>
    /// Brings over the listing for Forrest Loading
    /// </summary>
    public void ToggleCListing()
    {
        if (listingOpen)
        {
            mP.Reset();
            ToggleListing();
        }

        theMenu.localPosition  = (theMenu.localPosition == men[1]) ? men[0] : men[1];
        theCList.localPosition = (theCList.localPosition == listC[1]) ? listC[0] : listC[1];
        theCList.localScale    = (theCList.localPosition == listC[1]) ? Vector3.one * 1.75f : Vector3.one;
        logo.localPosition     = (logo.localPosition.x == logoX[1]) ? new Vector3(logoX[0], logo.localPosition.y, logo.localPosition.z) : new Vector3(logoX[1], logo.localPosition.y, logo.localPosition.z);
        SetForrButtons();
    }
Beispiel #2
0
    //
    void Start()
    {
        // Set the appropriate version number on the top left of screen
        vT.text = "v" + Application.version;

        menuParams.Check4MenuParam();

        // reference to our menu params
        mP = GameObject.Find("menuParams").GetComponent <menuParams>();
        mP.Reset();
        mP.adCount.x++;

        //
        if (Application.isMobilePlatform && mP.adCount.x >= mP.adCount.y)
        {
            //Advertisement.Show();
            mP.adCount.x = 0;
        }

        //
        coursesButts = GameObject.Find("Levels").GetComponentsInChildren <Button>();

        //
        forrestsButts = GameObject.Find("Forrests").GetComponentsInChildren <Button>();

        // Now entirely sure what I have to do this to make Campaign work, too lazy to investigate in depth. >_>
        ToggleListing();
        ToggleListing();

        menuLoad = LoadMenuData();

        sB.value  = Mathf.Round(int.Parse(menuLoad[0]));
        cO.value  = Mathf.Round(int.Parse(menuLoad[1]));
        sel.value = Mathf.Round(int.Parse(menuLoad[2]));
        smT.isOn  = bool.Parse(menuLoad[3]);
        rT.isOn   = bool.Parse(menuLoad[4]);
        rcT.isOn  = bool.Parse(menuLoad[5]);
        lS.value  = int.Parse(menuLoad[6]);
        aS.value  = int.Parse(menuLoad[7]);
    }