51 lines
1.2 KiB
C#
51 lines
1.2 KiB
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class TutorialPopUpItem : MonoBehaviour
|
|
{
|
|
public Text titleText;
|
|
|
|
public Text contentText;
|
|
|
|
public Text ClosePopUpText;
|
|
|
|
public GameObject CloseGamepadButtonImage;
|
|
|
|
public GameObject ImageContent1;
|
|
|
|
public GameObject ImageContent2;
|
|
|
|
public GameObject closePopUpImage;
|
|
|
|
public GameObject imageContainer;
|
|
|
|
public Animator animator;
|
|
|
|
private float closeTimer;
|
|
|
|
private void Start()
|
|
{
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
if (GameManager.Instance.controllerType == GameManager.ControllerType.GamePad)
|
|
{
|
|
ClosePopUpText.text = LanguageManager.Instance.GetText("KEYBINDS_PRESS_BUTTON");
|
|
CloseGamepadButtonImage.SetActive(value: true);
|
|
}
|
|
else
|
|
{
|
|
CloseGamepadButtonImage.SetActive(value: false);
|
|
ClosePopUpText.text = LanguageManager.Instance.GetText("SPACE_TO_CLOSE");
|
|
}
|
|
closeTimer += Time.unscaledDeltaTime;
|
|
closePopUpImage.SetActive(value: true);
|
|
animator.SetTrigger("Text");
|
|
if (GameManager.Instance.player.GetButtonDown("MouseClick") || GameManager.Instance.player.GetButtonDown("jumping") || GameManager.Instance.player.GetButtonDown("quickMenu"))
|
|
{
|
|
TutorialManager.Instance.CloseTutorialUpPopUp();
|
|
}
|
|
}
|
|
}
|