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: 0x02002ACE RID: 10958
|
|
[Token(Token = "0x2002ACE")]
|
|
public class AmmoHUDElement : MonoBehaviour
|
|
{
|
|
// Token: 0x06012359 RID: 74585 RVA: 0x0042060C File Offset: 0x0041E80C
|
|
[Token(Token = "0x6012359")]
|
|
[Address(RVA = "0x1A95A60", Offset = "0x1A94A60", VA = "0x181A95A60")]
|
|
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: 0x0601235A RID: 74586 RVA: 0x00420764 File Offset: 0x0041E964
|
|
[Token(Token = "0x601235A")]
|
|
[Address(RVA = "0x1A95E80", Offset = "0x1A94E80", VA = "0x181A95E80")]
|
|
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: 0x0601235B RID: 74587 RVA: 0x004207CC File Offset: 0x0041E9CC
|
|
[Token(Token = "0x601235B")]
|
|
[Address(RVA = "0x428AD0", Offset = "0x427AD0", VA = "0x180428AD0")]
|
|
public AmmoHUDElement()
|
|
{
|
|
}
|
|
|
|
// Token: 0x0400BB4E RID: 47950
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x400BB4E")]
|
|
[SerializeField]
|
|
private Slider ammoSlider;
|
|
|
|
// Token: 0x0400BB4F RID: 47951
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x400BB4F")]
|
|
[SerializeField]
|
|
private Text ammoText;
|
|
|
|
// Token: 0x0400BB50 RID: 47952
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x400BB50")]
|
|
[SerializeField]
|
|
private Text ammoLabelText;
|
|
|
|
// Token: 0x0400BB51 RID: 47953
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x400BB51")]
|
|
[SerializeField]
|
|
private Image[] images;
|
|
}
|
|
}
|