From 3c2c6c3b31f4b8d75948b7d1307ef1cc4c472293 Mon Sep 17 00:00:00 2001 From: tiendat3699 <96950844+tiendat3699@users.noreply.github.com> Date: Thu, 20 Jun 2024 10:30:19 +0700 Subject: [PATCH] feat: can change speed loading --- Assets/GadGame/SO/Api Reference.asset | 2 +- Assets/GadGame/Scenes/PassBy_coffee.unity | 1 + Assets/GadGame/Scripts/Coffee/CoffeeController.cs | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Assets/GadGame/SO/Api Reference.asset b/Assets/GadGame/SO/Api Reference.asset index 605751a..a2ca99e 100644 --- a/Assets/GadGame/SO/Api Reference.asset +++ b/Assets/GadGame/SO/Api Reference.asset @@ -18,7 +18,7 @@ MonoBehaviour: - name: LoginAsGameMachine type: 1 query: "mutation LoginAsGameMachine{\n loginAsGameMachine( input :{ macAddress - :\"D8BBC1004EF5\", password :\"Abc@123\"} ){\n accessToken\n + :\"D85ED3741515\", password :\"Sangta@123\"} ){\n accessToken\n refreshToken\n }\n}" queryString: loginAsGameMachine returnType: Game diff --git a/Assets/GadGame/Scenes/PassBy_coffee.unity b/Assets/GadGame/Scenes/PassBy_coffee.unity index 9f09995..ee74266 100644 --- a/Assets/GadGame/Scenes/PassBy_coffee.unity +++ b/Assets/GadGame/Scenes/PassBy_coffee.unity @@ -1330,6 +1330,7 @@ MonoBehaviour: _process: {fileID: 1701610193} _hintText: {fileID: 1386430229} _loading: {fileID: 1087577779} + _loadingSpeed: 50 _texts: - "Soi b\xF3ng b\u1EA1n trong t\xE1ch c\xE0 ph\xEA" - "Gi\u1EEF nguy\xEAn nh\u01B0 th\u1EBF nh\xE9" diff --git a/Assets/GadGame/Scripts/Coffee/CoffeeController.cs b/Assets/GadGame/Scripts/Coffee/CoffeeController.cs index e164fca..6cd4657 100644 --- a/Assets/GadGame/Scripts/Coffee/CoffeeController.cs +++ b/Assets/GadGame/Scripts/Coffee/CoffeeController.cs @@ -22,6 +22,7 @@ namespace GadGame.Scripts.Coffee [SerializeField] private Image _process; [SerializeField] private TextMeshProUGUI _hintText; [SerializeField] private Image _loading; + [SerializeField] private float _loadingSpeed = 100; [SerializeField] private string[] _texts; [SerializeField] private string[] _loadingTexts; @@ -89,12 +90,11 @@ namespace GadGame.Scripts.Coffee private void OnEngageReady() { - _loading.gameObject.SetActive(false); _process.fillAmount = 0; _isLoading = true; _hintText.text = _loadingTexts[_indexText]; _loading.DOFade(1, 1f); - _loading.transform.DOLocalRotate(new Vector3(0, 0, 360), 3, RotateMode.FastBeyond360) + _loading.transform.DOLocalRotate(new Vector3(0, 0, _loadingSpeed), 1, RotateMode.FastBeyond360) .SetLoops(-1) .SetRelative(true) .SetEase(Ease.Linear);