예제 #1
0
        private void RefreshHUD(PlayerMana playerMp)
        {
            long mana = playerMp.Mana;
            long maxMana = playerMp.MaxMana;

            if (maxMana == 0) {
                mana = 1;
                maxMana = 1;
            }

            try
            {
                this.Invoke((MethodInvoker)delegate {
                    RefreshHUD(mana, maxMana);
                });
            }
            catch
            {
            }
        }
예제 #2
0
 private void UpdateMana(PlayerMana playerMana)
 {
     mana = (float)playerMana.Mana / playerMana.MaxMana;
     this.Invalidate();
 }
예제 #3
0
        private void RefreshMana(PlayerMana playerMp)
        {
            manaPercentage = (float)playerMp.Mana / playerMp.MaxMana;

            try
            {
                this.Invoke((MethodInvoker)delegate {
                    RefreshHUD();
                });
            }
            catch { }
        }
예제 #4
0
        private static void UpdateMana()
        {
            bool attributesChanged = ReadMana();
            attributesChanged |= ReadMaxMana();

            if (attributesChanged && ManaChanged != null) {
                var playerMana = new PlayerMana {
                    Mana = mana,
                    MaxMana = maxMana
                };

                ManaChanged(null, playerMana);
            }
        }