added UI dodging nozzle on phones

This commit is contained in:
Mausham
2025-12-18 12:32:06 -08:00
parent f19bbb9d8c
commit ef015c6665
24 changed files with 534 additions and 22 deletions

View File

@@ -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);
}