Exemple #1
0
 private void OnScopeStateChange(object source, HeavyBowgunEventArgs args)
 {
     Dispatcher.BeginInvoke(DispatcherPriority.Render, new Action(() =>
     {
         IsZoomEquipped = args.HasScopeEquipped;
     }));
 }
Exemple #2
0
 private void OnScopeMultiplierChange(object source, HeavyBowgunEventArgs args)
 {
     Dispatcher.BeginInvoke(DispatcherPriority.Render, new Action(() =>
     {
         ZoomBarHeight = 78 * args.ScopeZoomMultiplier;
         ZoomValue     = $"{args.ScopeZoomMultiplier:0.0}x";
     }));
 }
Exemple #3
0
        private void HBGControl_Loaded(object sender, RoutedEventArgs e)
        {
            var args = new HeavyBowgunEventArgs(Context);

            OnEquippedAmmoChange(this, args);
            OnWyvernheartUpdate(this, args);
            OnWyvernsnipeUpdate(this, args);
            OnScopeStateChange(this, args);
            OnScopeMultiplierChange(this, args);
            OnSafijiivaCounterUpdate(this, new JobEventArgs(Context));
        }
Exemple #4
0
 private void OnWyvernheartUpdate(object source, HeavyBowgunEventArgs args)
 {
     if (args.SpecialAmmoType == HBGSpecialType.Wyvernheart)
     {
         Dispatcher.BeginInvoke(DispatcherPriority.Render, new Action(() =>
         {
             SpecialAmmoTimer      = $"{args.WyvernheartTimer:0}/{args.WyvernheartMaxAmmo:0}";
             SpecialAmmoPercentage = args.WyvernheartTimer / args.WyvernheartMaxAmmo;
         }));
     }
 }
Exemple #5
0
 private void OnAmmoCountChange(object source, HeavyBowgunEventArgs args)
 {
     Dispatcher.BeginInvoke(DispatcherPriority.Render, new Action(() =>
     {
         sEquippedAmmo ammo = args.EquippedAmmo;
         sAmmo ammoInfo     = args.Ammos.ElementAtOrDefault(ammo.index);
         AmmoText           = $"{ammoInfo.Ammo}/{ammoInfo.Maximum}";
         AmmoPercentage     = (double)ammoInfo.Ammo / (double)ammoInfo.Maximum;
         TotalAmmoCounter   = ammo.ItemId == 137 ? double.PositiveInfinity : ammoInfo.Total;
         CalculateCrafting(ammo.ItemId);
     }));
 }
Exemple #6
0
        private void OnWyvernsnipeUpdate(object source, HeavyBowgunEventArgs args)
        {
            if (args.SpecialAmmoType == HBGSpecialType.Wyvernsniper)
            {
                Dispatcher.BeginInvoke(DispatcherPriority.Render, new Action(() =>
                {
                    SpecialAmmoTimer      = $"{TimeSpan.FromSeconds(args.WyvernsnipeMaxTimer - args.WyvernsnipeTimer):m\\:ss}";
                    SpecialAmmoPercentage = 1 - ((args.WyvernsnipeMaxTimer - args.WyvernsnipeTimer) / args.WyvernsnipeMaxTimer);

                    SpecialAmmoPercentage = SpecialAmmoPercentage == 0 ? 1 : SpecialAmmoPercentage;
                }));
            }
        }