89 lines
2.3 KiB
C#
89 lines
2.3 KiB
C#
using System;
|
|
using AGUI.StackedUI;
|
|
using RecNet;
|
|
using RecRoom;
|
|
using UnityEngine;
|
|
|
|
// Token: 0x02001221 RID: 4641
|
|
[RequireComponent(typeof(PlayerSpecificUIBehaviour))]
|
|
public abstract class PlayerBasedConditionalButton<T> : ConditionalButton<T> where T : Button3DBase
|
|
{
|
|
// Token: 0x06027DD8 RID: 163288 RVA: 0x00B1AEEC File Offset: 0x00B190EC
|
|
protected virtual void Awake()
|
|
{
|
|
this.playerWatcher = base.GetComponent<PlayerSpecificUIBehaviour>();
|
|
this.playerWatcher.KKBAINBHLCK += this.INCPLELDHGF;
|
|
}
|
|
|
|
// Token: 0x06027DD9 RID: 163289 RVA: 0x00B1AF14 File Offset: 0x00B19114
|
|
protected virtual void OnDestroy()
|
|
{
|
|
if (this.playerWatcher != null)
|
|
{
|
|
this.playerWatcher.KKBAINBHLCK -= this.INCPLELDHGF;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06027DDA RID: 163290 RVA: 0x00B1AF40 File Offset: 0x00B19140
|
|
protected override void OnEnable()
|
|
{
|
|
base.OnEnable();
|
|
GLGMPGPNNBP.GGGHJGKGLOE += this.DHJLDKNHAPH;
|
|
LNPBGKENDPK.HBBDEELDEMH += this.HBBDEELDEMH;
|
|
}
|
|
|
|
// Token: 0x06027DDB RID: 163291 RVA: 0x00B1AF6C File Offset: 0x00B1916C
|
|
protected virtual void OnDisable()
|
|
{
|
|
GLGMPGPNNBP.GGGHJGKGLOE -= this.DHJLDKNHAPH;
|
|
LNPBGKENDPK.HBBDEELDEMH -= this.HBBDEELDEMH;
|
|
}
|
|
|
|
// Token: 0x06027DDC RID: 163292 RVA: 0x00B1AF90 File Offset: 0x00B19190
|
|
private void DHJLDKNHAPH(long? GKPEOHGOGCF)
|
|
{
|
|
if (GKPEOHGOGCF == null || this.playerWatcher.NAJBCPFNBAB == GKPEOHGOGCF)
|
|
{
|
|
this.INCPLELDHGF();
|
|
}
|
|
}
|
|
|
|
// Token: 0x06027DDD RID: 163293 RVA: 0x00B1AFE8 File Offset: 0x00B191E8
|
|
private void HBBDEELDEMH(long HPCOKMAPCHB)
|
|
{
|
|
if (this.playerWatcher.NAJBCPFNBAB == HPCOKMAPCHB)
|
|
{
|
|
this.INCPLELDHGF();
|
|
}
|
|
}
|
|
|
|
// Token: 0x06027DDE RID: 163294 RVA: 0x00B1B020 File Offset: 0x00B19220
|
|
protected override void FCIGEENKAAL()
|
|
{
|
|
if (this.playerWatcher.NAJBCPFNBAB == null)
|
|
{
|
|
Debug.LogWarning("Conditional Button attempted button press without player!");
|
|
return;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06027DDF RID: 163295 RVA: 0x00B1B050 File Offset: 0x00B19250
|
|
protected sealed override void INCPLELDHGF()
|
|
{
|
|
if (this.playerWatcher.NAJBCPFNBAB == null)
|
|
{
|
|
base.OJMEBFEALJC = 0;
|
|
return;
|
|
}
|
|
this.GFJDHECAPJD();
|
|
}
|
|
|
|
// Token: 0x06027DE0 RID: 163296
|
|
protected abstract void GFJDHECAPJD();
|
|
|
|
// Token: 0x04006395 RID: 25493
|
|
[SerializeField]
|
|
[ENMFCLPAKBJ(FOGKDGELKHN.Self, false)]
|
|
protected PlayerSpecificUIBehaviour playerWatcher;
|
|
}
|