Example #1
0
        public void SetCharBars(Character c, BarValue thp)
        {
            try
            {
                if (this.HPBar.InvokeRequired)
                {
                    SetCharBarsCallback d = new SetCharBarsCallback(SetCharBars);
                    this.Invoke(d, new object[] { c, thp });
                }
                else
                {
                    this.THPBar.Maximum = thp.max;
                    if (thp.val <= thp.max)
                    {
                        this.THPBar.Value = thp.val;
                    }
                    this.THPlabel.Text = thp.val + "/" + thp.max;

                    this.HPBar.Maximum = c.hp.max;
                    if (c.hp.val <= c.hp.max)
                    {
                        this.HPBar.Value = c.hp.val;
                    }
                    this.HPlabel.Text = c.hp.val + "/" + c.hp.max + "/" + c.hp.p + "%";

                    this.MPBar.Maximum = c.mp.max;
                    if (c.mp.val <= c.mp.max)
                    {
                        this.MPBar.Value = c.mp.val;
                    }
                    this.MPlabel.Text = c.mp.val + "/" + c.mp.max + "/" + c.mp.p + "%";
                }
            }
            catch { }
        }
Example #2
0
 public Character(Process _p)
 {
     p  = _p;
     cp = new BarValue();
     hp = new BarValue();
     mp = new BarValue();
 }