Esempio n. 1
0
    public void OnGUI()
    {
        health_bar.DrawBar();

        exp_bar.DrawBar();

        mana_bar.DrawBar();
    }
    public void OnGUI()
    {
        //health_bar.DrawBar();

        exp_bar.DrawBar();

        //mana_bar.DrawBar();

        //globe_test_bar.DrawBar();

        //// These are the example Incriment and Deincriment buttons, mainly for demonstration purposes only
        //if (GUI.Button(new Rect(health_bar.getScrollBarRect().x + (health_bar.getScrollBarRect().width / 2) - (128/2), health_bar.getScrollBarRect().y + (health_bar.getScrollBarRect().height / 2) - 30, 128, 20), "Increase Health"))
        //{
        //    health_bar.IncrimentBar(Random.Range(1, 6));
        //}
        //else if (GUI.Button(new Rect(health_bar.getScrollBarRect().x + (health_bar.getScrollBarRect().width / 2) - (128 / 2), health_bar.getScrollBarRect().y + (health_bar.getScrollBarRect().height / 2) + (20/2), 128, 20), "Decrease Health"))
        //{
        //    health_bar.IncrimentBar(Random.Range(-6, -1));
        //}

        //if (GUI.Button(new Rect(mana_bar.getScrollBarRect().x + (mana_bar.getScrollBarRect().width / 2) - (128 / 2), mana_bar.getScrollBarRect().y + (mana_bar.getScrollBarRect().height / 2) - 50, 128, 20), "Increase Mana"))
        //{
        //    mana_bar.IncrimentBar(Random.Range(1, 12));
        //}
        //else if (GUI.Button(new Rect(mana_bar.getScrollBarRect().x + (mana_bar.getScrollBarRect().width / 2) - (128 / 2), mana_bar.getScrollBarRect().y + (mana_bar.getScrollBarRect().height / 2) + 30, 128, 20), "Decrease Mana"))
        //{
        //    mana_bar.IncrimentBar(Random.Range(-12, -1));
        //}

        //if (GUI.Button(new Rect(exp_bar.getScrollBarRect().x + (exp_bar.getScrollBarRect().width / 2) - (132 / 2), exp_bar.getScrollBarRect().y + (exp_bar.getScrollBarRect().height / 2) - 50, 132, 20), "Increase Experience"))
        //{
        //    exp_bar.setValue((int)health);

        //}
        //else if (GUI.Button(new Rect(exp_bar.getScrollBarRect().x + (exp_bar.getScrollBarRect().width / 2) - (140 / 2), exp_bar.getScrollBarRect().y + (exp_bar.getScrollBarRect().height / 2) + 30, 140, 20), "Decrease Experience"))
        //{
        //    exp_bar.IncrimentBar(Random.Range(-12, -1));
        //}

        //if (GUI.Button(new Rect(globe_test_bar.getScrollBarRect().x + (globe_test_bar.getScrollBarRect().width / 2) - (140 / 2), globe_test_bar.getScrollBarRect().y + (globe_test_bar.getScrollBarRect().height / 2) - 85, 140, 20), "Increase Globe Value"))
        //{
        //    globe_test_bar.IncrimentBar(Random.Range(1, 12));
        //}
        //else if (GUI.Button(new Rect(globe_test_bar.getScrollBarRect().x + (globe_test_bar.getScrollBarRect().width / 2) - (145 / 2), globe_test_bar.getScrollBarRect().y + (globe_test_bar.getScrollBarRect().height / 2) + 70, 145, 20), "Decrease Globe Value"))
        //{
        //    globe_test_bar.IncrimentBar(Random.Range(-12, -1));
        //}
        // End of example buttons
    }