153 lines
3.8 KiB
C#
153 lines
3.8 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using Cpp2IlInjected;
|
|
using RecRoom.Activities.BattleRoyale;
|
|
using RecRoom.Core.Combat;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace RecRoom.UI.HUD
|
|
{
|
|
// Token: 0x02002523 RID: 9507
|
|
[Token(Token = "0x2002523")]
|
|
[StructLayout(3)]
|
|
public class AmmoHUDElement : MonoBehaviour
|
|
{
|
|
// Token: 0x06010660 RID: 67168 RVA: 0x003D81C0 File Offset: 0x003D63C0
|
|
[Token(Token = "0x6010660")]
|
|
[Address(RVA = "0x146B6C0", Offset = "0x146A0C0", VA = "0x18146B6C0")]
|
|
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: 0x06010661 RID: 67169 RVA: 0x003D8318 File Offset: 0x003D6518
|
|
[Token(Token = "0x6010661")]
|
|
[Address(RVA = "0x146BAE0", Offset = "0x146A4E0", VA = "0x18146BAE0")]
|
|
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: 0x06010662 RID: 67170 RVA: 0x003D8380 File Offset: 0x003D6580
|
|
[Token(Token = "0x6010662")]
|
|
[Address(RVA = "0x3C1210", Offset = "0x3BFC10", VA = "0x1803C1210")]
|
|
public AmmoHUDElement()
|
|
{
|
|
}
|
|
|
|
// Token: 0x0400AE89 RID: 44681
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x400AE89")]
|
|
[SerializeField]
|
|
private Slider ammoSlider;
|
|
|
|
// Token: 0x0400AE8A RID: 44682
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x400AE8A")]
|
|
[SerializeField]
|
|
private Text ammoText;
|
|
|
|
// Token: 0x0400AE8B RID: 44683
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x400AE8B")]
|
|
[SerializeField]
|
|
private Text ammoLabelText;
|
|
|
|
// Token: 0x0400AE8C RID: 44684
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x400AE8C")]
|
|
[SerializeField]
|
|
private Image[] images;
|
|
}
|
|
}
|