Files
Assembly-CSharp/Assembly-CSharp/CourseControllerBase.cs
2026-06-12 12:58:31 +08:00

175 lines
3.9 KiB
C#

using System;
using Manager;
using UnityEngine;
using UnityEngine.UI;
// Token: 0x0200008D RID: 141
public class CourseControllerBase : MonoBehaviour
{
// Token: 0x060004F4 RID: 1268 RVA: 0x00003598 File Offset: 0x00002798
private void Awake()
{
}
// Token: 0x060004F5 RID: 1269 RVA: 0x00012FB8 File Offset: 0x000121B8
public virtual void Initialize(int monitorIndex)
{
this._monitorIndex = monitorIndex;
for (int i = 0; i < this._tabButtons.Length; i++)
{
this._tabButtons[i].Initialize(this._monitorIndex);
}
this._tabButtons[0].UseRightArrow();
this._tabButtons[1].UseLeftArrow();
this._animation.Play("Out");
this.SetVisibleParts(false);
}
// Token: 0x060004F6 RID: 1270 RVA: 0x00013024 File Offset: 0x00012224
public void UpdateButtonView()
{
if (!this._isAnimation)
{
return;
}
this._syncTimer += (float)GameManager.GetGameMSecAdd() / 1000f;
for (int i = 0; i < this._tabButtons.Length; i++)
{
this._tabButtons[i].ViewUpdate(this._syncTimer);
}
if (1f < this._syncTimer)
{
this._syncTimer = 0f;
}
}
// Token: 0x060004F7 RID: 1271 RVA: 0x00013091 File Offset: 0x00012291
public void PlayInAnimation()
{
this._animation.Play("In");
this._isAnimation = true;
this.SetVisibleParts(true);
}
// Token: 0x060004F8 RID: 1272 RVA: 0x000130B4 File Offset: 0x000122B4
public void PlayOutAnimation()
{
if (this._isAnimation)
{
this._animation.Play("Out");
this._isAnimation = false;
this.SetVisibleParts(false);
Image leftIcon = this._leftIcon;
if (leftIcon != null)
{
leftIcon.gameObject.SetActive(false);
}
Image rightIcon = this._rightIcon;
if (rightIcon == null)
{
return;
}
rightIcon.gameObject.SetActive(false);
}
}
// Token: 0x060004F9 RID: 1273 RVA: 0x00013114 File Offset: 0x00012314
public void PlayChangeAnimation()
{
this._animation.Play("In_Change");
}
// Token: 0x060004FA RID: 1274 RVA: 0x00013126 File Offset: 0x00012326
public void PlayMoveRightAnimation()
{
this._animation.Play("Move_Right");
}
// Token: 0x060004FB RID: 1275 RVA: 0x00013138 File Offset: 0x00012338
public void PlayMoveLeftAnimation()
{
this._animation.Play("Move_Left");
}
// Token: 0x060004FC RID: 1276 RVA: 0x0001314A File Offset: 0x0001234A
public void PressedTabButton(bool isRight)
{
this._tabButtons[isRight ? 0 : 1].Pressed();
}
// Token: 0x060004FD RID: 1277 RVA: 0x00003598 File Offset: 0x00002798
public virtual void SetVisibleParts(bool isActive)
{
}
// Token: 0x060004FE RID: 1278 RVA: 0x00013160 File Offset: 0x00012360
public void SetLeftIcon(Sprite sprite)
{
if (this._leftIcon != null)
{
if (sprite != null)
{
this._leftIcon.gameObject.SetActive(true);
this._leftIcon.sprite = sprite;
return;
}
this._leftIcon.gameObject.SetActive(false);
}
}
// Token: 0x060004FF RID: 1279 RVA: 0x000131B4 File Offset: 0x000123B4
public void SetRightIcon(Sprite sprite)
{
if (this._rightIcon != null)
{
if (sprite != null)
{
this._rightIcon.gameObject.SetActive(true);
this._rightIcon.sprite = sprite;
return;
}
this._rightIcon.gameObject.SetActive(false);
}
}
// Token: 0x04000377 RID: 887
[SerializeField]
protected Transform[] _leftTransforms;
// Token: 0x04000378 RID: 888
[SerializeField]
protected Transform[] _rightTransforms;
// Token: 0x04000379 RID: 889
[SerializeField]
protected AnimationParts _animation;
// Token: 0x0400037A RID: 890
[SerializeField]
protected Transform[] _tabButtonTrans;
// Token: 0x0400037B RID: 891
[SerializeField]
protected GameObject _tabButtonObj;
// Token: 0x0400037C RID: 892
[SerializeField]
protected Image _leftIcon;
// Token: 0x0400037D RID: 893
[SerializeField]
protected Image _rightIcon;
// Token: 0x0400037E RID: 894
protected TabButton[] _tabButtons;
// Token: 0x0400037F RID: 895
protected bool _isAnimation;
// Token: 0x04000380 RID: 896
protected int _monitorIndex;
// Token: 0x04000381 RID: 897
protected float _syncTimer;
}