151 lines
3.6 KiB
C#
151 lines
3.6 KiB
C#
using System;
|
|
using Cpp2IlInjected;
|
|
using RecRoom.Activities.BattleRoyale;
|
|
using RecRoom.Core.Combat;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace RecRoom.UI.HUD
|
|
{
|
|
// Token: 0x020029E5 RID: 10725
|
|
[Token(Token = "0x20029E5")]
|
|
public class AmmoHUDElement : MonoBehaviour
|
|
{
|
|
// Token: 0x06011F1D RID: 73501 RVA: 0x00416B54 File Offset: 0x00414D54
|
|
[Token(Token = "0x6011F1D")]
|
|
[Address(RVA = "0x1009610", Offset = "0x1008410", VA = "0x181009610")]
|
|
public void UpdateAmmo(Weapon GDIGKHINJCG)
|
|
{
|
|
int num = 0;
|
|
bool flag = GDIGKHINJCG != num;
|
|
GameObject gameObject = base.gameObject;
|
|
if (flag)
|
|
{
|
|
gameObject.SetActive(true);
|
|
Text text = this.ammoLabelText;
|
|
int num2 = 0;
|
|
if (text != num2)
|
|
{
|
|
BattleRoyaleGear component = GDIGKHINJCG.GetComponent<BattleRoyaleGear>();
|
|
int num3 = 0;
|
|
if (!(component != num3))
|
|
{
|
|
SpawnableTool component2 = GDIGKHINJCG.GetComponent<SpawnableTool>();
|
|
int num4 = 0;
|
|
if (!(component2 != num4))
|
|
{
|
|
goto IL_A1;
|
|
}
|
|
int type = (int)component2.OPLHMKFCNOL;
|
|
Text text2 = this.ammoLabelText;
|
|
string text4;
|
|
string text3 = text4.ToUpper();
|
|
string text5 = text2.text;
|
|
}
|
|
Text text6 = this.ammoLabelText;
|
|
string displayName = component.OOJFBECGEAD;
|
|
string text7 = text6.text;
|
|
}
|
|
IL_A1:
|
|
Slider slider = this.ammoSlider;
|
|
int num5 = 0;
|
|
if (slider != num5)
|
|
{
|
|
bool ammunitionSupported = GDIGKHINJCG.HOEGEPPBJAE;
|
|
if (ammunitionSupported)
|
|
{
|
|
float magazineAmmunitionNormalized = GDIGKHINJCG.CGOPGIAIOIK;
|
|
}
|
|
if (!ammunitionSupported)
|
|
{
|
|
}
|
|
float value = this.ammoSlider.value;
|
|
}
|
|
Text text8 = this.ammoText;
|
|
int num6 = 0;
|
|
if (text8 != num6)
|
|
{
|
|
if (GDIGKHINJCG.HOEGEPPBJAE)
|
|
{
|
|
if (GDIGKHINJCG.hasInfiniteReserveAmmunition && GDIGKHINJCG.ammunitionMagazineSize < 2)
|
|
{
|
|
string text9 = this.ammoText.text;
|
|
}
|
|
int totalAmmunition = GDIGKHINJCG.KKCCBKKKAKF;
|
|
string text10 = this.ammoText.text;
|
|
}
|
|
else
|
|
{
|
|
string text10;
|
|
if (text10 == 0)
|
|
{
|
|
goto IL_139;
|
|
}
|
|
goto IL_139;
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
IL_139:
|
|
int num7 = 0;
|
|
gameObject.SetActive(num7 != 0);
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06011F1E RID: 73502 RVA: 0x00416CAC File Offset: 0x00414EAC
|
|
[Token(Token = "0x6011F1E")]
|
|
[Address(RVA = "0x1009A30", Offset = "0x1008830", VA = "0x181009A30")]
|
|
public void UpdateColor(Color GJAINANBOCB)
|
|
{
|
|
Text text = this.ammoLabelText;
|
|
int num = 0;
|
|
if (text != num)
|
|
{
|
|
Color color = this.ammoLabelText.color;
|
|
}
|
|
Image[] array = this.images;
|
|
if (array != 0)
|
|
{
|
|
int num2 = 0;
|
|
if (num2 < array.Length)
|
|
{
|
|
Color color2 = array[num2].color;
|
|
Image[] array2 = this.images;
|
|
num2++;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06011F1F RID: 73503 RVA: 0x00416D14 File Offset: 0x00414F14
|
|
[Token(Token = "0x6011F1F")]
|
|
[Address(RVA = "0x74EA40", Offset = "0x74D840", VA = "0x18074EA40")]
|
|
public AmmoHUDElement()
|
|
{
|
|
}
|
|
|
|
// Token: 0x0400B93E RID: 47422
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x400B93E")]
|
|
[SerializeField]
|
|
private Slider ammoSlider;
|
|
|
|
// Token: 0x0400B93F RID: 47423
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x400B93F")]
|
|
[SerializeField]
|
|
private Text ammoText;
|
|
|
|
// Token: 0x0400B940 RID: 47424
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x400B940")]
|
|
[SerializeField]
|
|
private Text ammoLabelText;
|
|
|
|
// Token: 0x0400B941 RID: 47425
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x400B941")]
|
|
[SerializeField]
|
|
private Image[] images;
|
|
}
|
|
}
|