73 lines
2.2 KiB
C#
73 lines
2.2 KiB
C#
|
|
using System.Collections;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using TMPro;
|
|||
|
|
using UnityEngine;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ϷUI_<49><5F>ʾ<EFBFBD>¼<EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public partial class GameUI
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ʾ<EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public TextMeshProUGUI eventType;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
///<2F><>ʾ<EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public TextMeshProUGUI eventTypeValue;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ʾ<EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public GameObject eventObj;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ʾ<EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public Animation eventAnim;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public void SetEventType(E_ShowEventType e_ShowEventType, string value)
|
|||
|
|
{
|
|||
|
|
if (!GuidanceManger.Instance.isEnableNormalMode) return;
|
|||
|
|
eventAnim.Play(MyConstant.ShakeShow);
|
|||
|
|
eventObj.gameObject.SetActive(true);
|
|||
|
|
switch (e_ShowEventType)
|
|||
|
|
{
|
|||
|
|
case E_ShowEventType.JudgmentOvertaking:
|
|||
|
|
eventType.color = Color.yellow;
|
|||
|
|
eventType.text = "Dangerous!!!"+"X"+Scenes.Instance.gameScene.judgmentOvertakingNumber;
|
|||
|
|
eventTypeValue.text = "Money+" + value;
|
|||
|
|
break;
|
|||
|
|
case E_ShowEventType.Side:
|
|||
|
|
eventType.color =Color.red;
|
|||
|
|
eventType.text = "Side!!!";
|
|||
|
|
eventTypeValue.text = "HP-" + value;
|
|||
|
|
break;
|
|||
|
|
case E_ShowEventType.Bevel:
|
|||
|
|
eventType.color = Color.red;
|
|||
|
|
eventType.text = "Bevel!!!";
|
|||
|
|
eventTypeValue.text = "HP-" + value;
|
|||
|
|
break;
|
|||
|
|
case E_ShowEventType.RearEnd:
|
|||
|
|
eventType.color = Color.red;
|
|||
|
|
eventType.text = "RearEnd!!!";
|
|||
|
|
eventTypeValue.text = "HP-" + value;
|
|||
|
|
break;
|
|||
|
|
case E_ShowEventType.Strike:
|
|||
|
|
eventType.color = Color.yellow;
|
|||
|
|
eventType.text = "Strike!!!";
|
|||
|
|
eventTypeValue.text = "Money+" + value;
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
DelayedProcessingManager.Instance.ResetDelayDoSecond("Event", this, 2f, () =>
|
|||
|
|
{
|
|||
|
|
eventAnim.Play(MyConstant.ShakeHide);
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
}
|