135 lines
3.7 KiB
C#
135 lines
3.7 KiB
C#
using System;
|
|
using Fx;
|
|
using Mai2.Mai2Cue;
|
|
using Manager;
|
|
using UI;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
// Token: 0x02000066 RID: 102
|
|
public class FavoriteButton : CommonButtonObject
|
|
{
|
|
// Token: 0x06000377 RID: 887 RVA: 0x0000DA14 File Offset: 0x0000CC14
|
|
public void Initialize(int monitorIndex)
|
|
{
|
|
this.MonitorIndex = monitorIndex;
|
|
}
|
|
|
|
// Token: 0x06000378 RID: 888 RVA: 0x0000DA20 File Offset: 0x0000CC20
|
|
public void ChangeString(bool isFavorite)
|
|
{
|
|
if (isFavorite)
|
|
{
|
|
this.SetSymbol(this._symbolSprites[0], false);
|
|
this._baseImage.sprite = (this._bShadowImage.sprite = this._typeBSprites[0]);
|
|
this._mainImage.sprite = (this._aBaseShadowImage.sprite = this._typeASprites[0]);
|
|
this._shadow.effectColor = this._effectColors[0];
|
|
return;
|
|
}
|
|
this.SetSymbol(this._symbolSprites[1], false);
|
|
this._baseImage.sprite = (this._bShadowImage.sprite = this._typeBSprites[1]);
|
|
this._mainImage.sprite = (this._aBaseShadowImage.sprite = this._typeASprites[1]);
|
|
this._shadow.effectColor = this._effectColors[1];
|
|
}
|
|
|
|
// Token: 0x06000379 RID: 889 RVA: 0x0000DB04 File Offset: 0x0000CD04
|
|
public void ImmediateChangeString(bool isFavorite)
|
|
{
|
|
if (isFavorite)
|
|
{
|
|
this.SetSymbolSprite(this._symbolSprites[0], false);
|
|
this._baseImage.sprite = (this._bShadowImage.sprite = this._typeBSprites[0]);
|
|
this._mainImage.sprite = (this._aBaseShadowImage.sprite = this._typeASprites[0]);
|
|
this._shadow.effectColor = this._effectColors[0];
|
|
return;
|
|
}
|
|
this.SetSymbolSprite(this._symbolSprites[1], false);
|
|
this._baseImage.sprite = (this._bShadowImage.sprite = this._typeBSprites[1]);
|
|
this._mainImage.sprite = (this._aBaseShadowImage.sprite = this._typeASprites[1]);
|
|
this._shadow.effectColor = this._effectColors[1];
|
|
}
|
|
|
|
// Token: 0x0600037A RID: 890 RVA: 0x0000DBE5 File Offset: 0x0000CDE5
|
|
public override void SetSymbol(Sprite synbolSprite, bool isFlip)
|
|
{
|
|
this.SetSymbolSprite(synbolSprite, isFlip);
|
|
this.IsButtonVisible = true;
|
|
if (base.gameObject.activeInHierarchy && this.IsButtonVisible)
|
|
{
|
|
this.ButtonAnimator.SetTrigger("In");
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600037B RID: 891 RVA: 0x0000DC1C File Offset: 0x0000CE1C
|
|
public override void Pressed()
|
|
{
|
|
if (base.gameObject.activeInHierarchy)
|
|
{
|
|
this.ButtonAnimator.SetTrigger("Pressed");
|
|
SoundManager.PlaySE(Cue.SE_SYS_CURSOR, this.MonitorIndex);
|
|
FX_Controler particleControler = this.ParticleControler;
|
|
if (particleControler != null)
|
|
{
|
|
particleControler.SetTransform(this.EffectTransform.position);
|
|
}
|
|
FX_Controler particleControler2 = this.ParticleControler;
|
|
if (particleControler2 == null)
|
|
{
|
|
return;
|
|
}
|
|
particleControler2.Play();
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600037C RID: 892 RVA: 0x0000DC83 File Offset: 0x0000CE83
|
|
public StateAnimController GetBehaviour()
|
|
{
|
|
Animator buttonAnimator = this.ButtonAnimator;
|
|
if (buttonAnimator == null)
|
|
{
|
|
return null;
|
|
}
|
|
return buttonAnimator.GetBehaviour<StateAnimController>();
|
|
}
|
|
|
|
// Token: 0x04000231 RID: 561
|
|
[SerializeField]
|
|
private Image _baseImage;
|
|
|
|
// Token: 0x04000232 RID: 562
|
|
[SerializeField]
|
|
private Image _mainImage;
|
|
|
|
// Token: 0x04000233 RID: 563
|
|
[SerializeField]
|
|
private Shadow _shadow;
|
|
|
|
// Token: 0x04000234 RID: 564
|
|
[SerializeField]
|
|
private Image _bShadowImage;
|
|
|
|
// Token: 0x04000235 RID: 565
|
|
[SerializeField]
|
|
private Image _aBaseShadowImage;
|
|
|
|
// Token: 0x04000236 RID: 566
|
|
[SerializeField]
|
|
[Header("シンボルスプライト")]
|
|
private Sprite[] _symbolSprites;
|
|
|
|
// Token: 0x04000237 RID: 567
|
|
[SerializeField]
|
|
[Header("AType")]
|
|
private Sprite[] _typeASprites;
|
|
|
|
// Token: 0x04000238 RID: 568
|
|
[SerializeField]
|
|
[Header("BType")]
|
|
private Sprite[] _typeBSprites;
|
|
|
|
// Token: 0x04000239 RID: 569
|
|
[SerializeField]
|
|
[Header("ShadowEffectColor")]
|
|
private Color[] _effectColors;
|
|
}
|