// Token: 0x06001658 RID: 5720 RVA: 0x0007C478 File Offset: 0x0007A678 private void Start() { this.baseWidth = this.bgr.transform.localScale.x; this.baseScale = this.text.transform.localScale.x; GameState.Current.PlayerData.ActiveWeapon.AddEventAndFire(delegate(WeaponSlot el) { if (el != null) { WeaponSlot currentWeapon = Singleton <WeaponController> .Instance.GetCurrentWeapon(); this.oldValue = (float)AmmoDepot.AmmoOfClass(currentWeapon.View.ItemClass); this.OnChanged(); } }, this); GameState.Current.PlayerData.Ammo.AddEvent(delegate(int el) { this.OnChanged(); }, this); }
// Token: 0x06001659 RID: 5721 RVA: 0x0007C504 File Offset: 0x0007A704 private void OnChanged() { WeaponSlot currentWeapon = Singleton <WeaponController> .Instance.GetCurrentWeapon(); bool flag = currentWeapon != null && currentWeapon.View.ItemClass != UberstrikeItemClass.WeaponMelee; this.panel.alpha = (float)((!flag) ? 0 : 1); if (!flag) { return; } int num = AmmoDepot.AmmoOfClass(currentWeapon.View.ItemClass); int maxValue = AmmoDepot.MaxAmmoOfClass(currentWeapon.View.ItemClass); base.StopAllCoroutines(); if ((float)num != this.oldValue) { base.StartCoroutine(this.PulseCrt((float)num >= this.oldValue)); } base.StartCoroutine(this.AnimateCrt(num, maxValue)); }