late goodbye

This commit is contained in:
2022-11-14 20:02:23 +05:00
parent d540eb1e06
commit 7ba948e4af
43 changed files with 11842 additions and 145 deletions
+28
View File
@@ -1,12 +1,31 @@
using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using UnityEngine;
using UnityEngine.UI;
public class UIMainMenu : UICanvas
{
[SerializeField] private Text stationName;
[SerializeField] UITrainButton[] trainButtons;
public Image aboutTrainButton;
public Train currentTrain { get; set; }
public void ShowAboutTrainButton()
{
aboutTrainButton.gameObject.SetActive(true);
aboutTrainButton.color = new Color(1, 1, 1, 0);
aboutTrainButton.DOFade(.7f, 10f);
}
void Update()
{
if(aboutTrainButton.gameObject.activeSelf && currentTrain != null)
aboutTrainButton.rectTransform
.position = Camera.main.WorldToScreenPoint(currentTrain.transform.position + Vector3.up * 1.5f);
}
public void UpdateLocationMenu(Location location)
{
@@ -37,4 +56,13 @@ public class UIMainMenu : UICanvas
break;
}
}
public void ResetButtons()
{
foreach(var button in trainButtons)
button.Unselect();
aboutTrainButton.gameObject.SetActive(false);
currentTrain = null;
}
}