ИИ гонщиков, запуск, перезапуск игры и пр
This commit is contained in:
1 parent
f557c58c9d
commit
efcfaae647
48 files changed
+1486
-212
No files matched your search
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using Code.Infrastructure.UI;
|
||||
using DG.Tweening;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Code.Example.Race.UI
|
||||
{
|
||||
public class WinScreen : UIPanel
|
||||
{
|
||||
[SerializeField] private Image image;
|
||||
[SerializeField] private TMP_Text winText;
|
||||
[SerializeField] private Color shownColor;
|
||||
[SerializeField] private Color hiddenColor;
|
||||
|
||||
public void SetText(string text) => winText.text = text;
|
||||
public override void Open(Action callback = null)
|
||||
{
|
||||
image.DOColor(shownColor, 1f).onComplete = () => callback?.Invoke();
|
||||
winText.DOColor(shownColor, 1f).onComplete = () => callback?.Invoke();
|
||||
}
|
||||
|
||||
public override void Close(Action callback = null)
|
||||
{
|
||||
image.DOColor(hiddenColor, 1f).onComplete = () => callback?.Invoke();
|
||||
winText.DOColor(hiddenColor, 1f).onComplete = () => callback?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user