145 lines
4.4 KiB
C#
145 lines
4.4 KiB
C#
using System;
|
|
using Cpp2IlInjected;
|
|
using DG.Tweening;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
// Token: 0x020002C5 RID: 709
|
|
[Token(Token = "0x20002C5")]
|
|
public class UIInteractionPromptController : MonoBehaviour
|
|
{
|
|
// Token: 0x06001A73 RID: 6771 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6001A73")]
|
|
[Address(RVA = "0x7B82C0", Offset = "0x7B6AC0", VA = "0x1807B82C0")]
|
|
public void Init()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06001A74 RID: 6772 RVA: 0x0003F764 File Offset: 0x0003D964
|
|
[Token(Token = "0x6001A74")]
|
|
[Address(RVA = "0x7B7F40", Offset = "0x7B6740", VA = "0x1807B7F40")]
|
|
public void Appear(string content)
|
|
{
|
|
UIInteractionPrompt[] array = this.prompts;
|
|
int num = this.promptIndex;
|
|
UIInteractionPrompt uiinteractionPrompt = array[num];
|
|
bool flag;
|
|
if (uiinteractionPrompt.gameObject.activeSelf)
|
|
{
|
|
flag = uiinteractionPrompt.fadeInProcessor.IsPlaying();
|
|
if (flag)
|
|
{
|
|
uiinteractionPrompt.fadeInProcessor.Complete();
|
|
}
|
|
uiinteractionPrompt.fadeOutProcessor.Restart(true, -1f);
|
|
}
|
|
int num2 = this.promptIndex;
|
|
num2++;
|
|
if (flag < false)
|
|
{
|
|
num2++;
|
|
}
|
|
this.promptIndex = num2;
|
|
UIInteractionPrompt uiinteractionPrompt2 = this.prompts[num2];
|
|
uiinteractionPrompt2.content.text = content;
|
|
if (uiinteractionPrompt2.fadeOutProcessor.IsPlaying())
|
|
{
|
|
uiinteractionPrompt2.fadeOutProcessor.Complete();
|
|
}
|
|
uiinteractionPrompt2.fadeInProcessor.Restart(true, -1f);
|
|
Game.PlayCanvasSE(UICanvasSFX.InteractionTip);
|
|
}
|
|
|
|
// Token: 0x06001A75 RID: 6773 RVA: 0x0003F838 File Offset: 0x0003DA38
|
|
[Token(Token = "0x6001A75")]
|
|
[Address(RVA = "0x7B8230", Offset = "0x7B6A30", VA = "0x1807B8230")]
|
|
public void Hide()
|
|
{
|
|
UIInteractionPrompt[] array = this.prompts;
|
|
int num = this.promptIndex;
|
|
UIInteractionPrompt uiinteractionPrompt = array[num];
|
|
if (uiinteractionPrompt.gameObject.activeSelf)
|
|
{
|
|
if (uiinteractionPrompt.fadeInProcessor.IsPlaying())
|
|
{
|
|
uiinteractionPrompt.fadeInProcessor.Complete();
|
|
}
|
|
uiinteractionPrompt.fadeOutProcessor.Restart(true, -1f);
|
|
return;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06001A76 RID: 6774 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6001A76")]
|
|
[Address(RVA = "0x7B8570", Offset = "0x7B6D70", VA = "0x1807B8570")]
|
|
public void UpdateInputIcons(ControllerDevice device)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06001A77 RID: 6775 RVA: 0x0003F89C File Offset: 0x0003DA9C
|
|
[Token(Token = "0x6001A77")]
|
|
[Address(RVA = "0x7B84A0", Offset = "0x7B6CA0", VA = "0x1807B84A0")]
|
|
public void Localize(LocalizationData data)
|
|
{
|
|
UIInteractionPrompt[] array = this.prompts;
|
|
int num = 0;
|
|
int length = array.Length;
|
|
if (num < length)
|
|
{
|
|
UIInteractionPrompt uiinteractionPrompt = array[num];
|
|
GameFontPack fontPack = data.fontPack;
|
|
Text content = uiinteractionPrompt.content;
|
|
Font medium = fontPack.medium;
|
|
content.font = medium;
|
|
Text label = uiinteractionPrompt.inputIcon.label;
|
|
Font regular = fontPack.regular;
|
|
label.font = regular;
|
|
num++;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06001A78 RID: 6776 RVA: 0x0003F910 File Offset: 0x0003DB10
|
|
[Token(Token = "0x6001A78")]
|
|
[Address(RVA = "0x7B80D0", Offset = "0x7B68D0", VA = "0x1807B80D0")]
|
|
public void Dispose()
|
|
{
|
|
UIInteractionPrompt[] array = this.prompts;
|
|
int num = 0;
|
|
int length = array.Length;
|
|
if (num < length)
|
|
{
|
|
UIInteractionPrompt uiinteractionPrompt = array[num];
|
|
Sequence fadeInProcessor = uiinteractionPrompt.fadeInProcessor;
|
|
int num2 = 0;
|
|
fadeInProcessor.Kill(num2 != 0);
|
|
Sequence fadeOutProcessor = uiinteractionPrompt.fadeOutProcessor;
|
|
int num3 = 0;
|
|
fadeOutProcessor.Kill(num3 != 0);
|
|
num++;
|
|
}
|
|
Game.RemoveDeviceChangedHandler(new Action(this.UpdateInputIcons));
|
|
Game.RemoveKeyBindingChangedHandler(new Action(this.UpdateInputIcons));
|
|
}
|
|
|
|
// Token: 0x06001A79 RID: 6777 RVA: 0x0003F990 File Offset: 0x0003DB90
|
|
[Token(Token = "0x6001A79")]
|
|
[Address(RVA = "0x7B8620", Offset = "0x7B6E20", VA = "0x1807B8620")]
|
|
public UIInteractionPromptController()
|
|
{
|
|
}
|
|
|
|
// Token: 0x04002463 RID: 9315
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4002463")]
|
|
[SerializeField]
|
|
private UIInteractionPrompt[] prompts;
|
|
|
|
// Token: 0x04002464 RID: 9316
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4002464")]
|
|
[SerializeField]
|
|
private int promptIndex = (int)((ulong)4294967295L);
|
|
}
|