added UI dodging nozzle on phones
This commit is contained in:
@@ -27,7 +27,7 @@ namespace Darkmatter.Presentation
|
||||
private void OnLeaderBoardBtnClicked()
|
||||
{
|
||||
IaudioController.PlayBtnPressedSound();
|
||||
IleaderBoardController.ShowLeaderBoard();
|
||||
IleaderBoardController.ShowLeaderBoardAsync();
|
||||
}
|
||||
|
||||
public void ShowDeathScreen()
|
||||
|
||||
@@ -24,7 +24,6 @@ namespace Darkmatter.Presentation
|
||||
|
||||
private void UpdateScore(int score)
|
||||
{
|
||||
Debug.Log("calling Score");
|
||||
gameScreenView.UpdateScore(score);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Darkmatter.Core;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Unity.Services.Leaderboards;
|
||||
using UnityEngine;
|
||||
using VContainer;
|
||||
@@ -33,13 +35,16 @@ namespace Darkmatter.Presentation
|
||||
leaderBoardView.Hide();
|
||||
}
|
||||
|
||||
public void ShowLeaderBoard()
|
||||
public async UniTask ShowLeaderBoardAsync()
|
||||
{
|
||||
LoadLeaderBoard();
|
||||
leaderBoardView.Show();
|
||||
leaderBoardView.ShowLoading(true);
|
||||
await LoadLeaderBoard();
|
||||
leaderBoardView.ShowLoading(false);
|
||||
|
||||
}
|
||||
|
||||
async void LoadLeaderBoard()
|
||||
async UniTask LoadLeaderBoard()
|
||||
{
|
||||
var score = await LeaderboardsService.Instance.GetScoresAsync(leaderBoardID, new GetScoresOptions { Limit = 10 });
|
||||
int rank = 1;
|
||||
@@ -63,7 +68,7 @@ namespace Darkmatter.Presentation
|
||||
}
|
||||
}
|
||||
|
||||
public async void UpdateLeaderBoardScore(int score)
|
||||
public async UniTask UpdateLeaderBoardScore(int score)
|
||||
{
|
||||
await LeaderboardsService.Instance.AddPlayerScoreAsync(leaderBoardID, score);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace Darkmatter.Presentation
|
||||
public GameObject leaderBoardScreen;
|
||||
public Button ExitButton;
|
||||
public LeaderBoardData LBplayerData;
|
||||
public TextMeshProUGUI loadingText;
|
||||
|
||||
public void Show()
|
||||
{
|
||||
@@ -20,5 +21,10 @@ namespace Darkmatter.Presentation
|
||||
{
|
||||
leaderBoardScreen.SetActive(false);
|
||||
}
|
||||
|
||||
public void ShowLoading(bool shouldShow)
|
||||
{
|
||||
loadingText.gameObject.SetActive(shouldShow);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ namespace Darkmatter.Presentation
|
||||
[Inject] private IGameSession IgameSession;
|
||||
public StartScreenController(StartScreenView _startScreenView, IGameScreenController _gameScreenController)
|
||||
{
|
||||
Debug.Log("StartScreenController Constructor Called");
|
||||
startScreenView = _startScreenView;
|
||||
gameScreenController = _gameScreenController;
|
||||
startScreenView.tapToStartButton.onClick.AddListener(OnTapToStartButtonClicked);
|
||||
|
||||
Reference in New Issue
Block a user