added animations
This commit is contained in:
1 parent
bae0e2218e
commit
8ea88f9aaf
3 files changed
+16
-6
No files matched your search
@@ -1,6 +1,7 @@
|
||||
using Code.DI;
|
||||
using Code.Input;
|
||||
using Code.Records;
|
||||
using DG.Tweening;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
@@ -21,10 +22,9 @@ namespace Code.Gameplay
|
||||
|
||||
private float _startTime;
|
||||
private float _elapsedTime;
|
||||
private bool _isRaceActive = false;
|
||||
private bool _isRaceActive;
|
||||
private IInputService _inputService;
|
||||
|
||||
private TMP_Text _resultText;
|
||||
private TMP_InputField _nameField;
|
||||
private Button _restartButton;
|
||||
private Button _toMenuButton;
|
||||
@@ -34,7 +34,6 @@ namespace Code.Gameplay
|
||||
var container = FindFirstObjectByType<DIContainer>();
|
||||
_inputService = container.Resolve<IInputService>();
|
||||
|
||||
_resultText = resultsWrapper.transform.Find("Text Area")?.Find("Text")?.GetComponent<TMP_Text>();
|
||||
_nameField = resultsWrapper.transform.Find("EnterNameField")?.GetComponent<TMP_InputField>();
|
||||
_restartButton = resultsWrapper.transform.Find("RestartButton")?.GetComponent<Button>();
|
||||
_toMenuButton = resultsWrapper.transform.Find("ToMenuButton")?.GetComponent<Button>();
|
||||
@@ -107,6 +106,10 @@ namespace Code.Gameplay
|
||||
countdownText.gameObject.SetActive(false);
|
||||
|
||||
resultsWrapper.SetActive(true);
|
||||
var rect = resultsWrapper.GetComponent<RectTransform>();
|
||||
rect.localScale = Vector3.zero;
|
||||
rect.DOScale(Vector3.one, 0.3f).SetEase(Ease.OutBack);
|
||||
|
||||
_inputService.DisableMap(ActionMapping.Gameplay);
|
||||
|
||||
_restartButton.onClick.AddListener(RestartRace);
|
||||
|
||||
Reference in new issue
Block a user