added UI dodging nozzle on phones
This commit is contained in:
@@ -2,6 +2,7 @@ using Unity.Services.Core;
|
||||
using System.Threading.Tasks;
|
||||
using Unity.Services.Authentication;
|
||||
using UnityEngine;
|
||||
using Cysharp.Threading.Tasks;
|
||||
|
||||
|
||||
namespace Darkmatter.Presentation
|
||||
@@ -13,7 +14,7 @@ namespace Darkmatter.Presentation
|
||||
await Init();
|
||||
}
|
||||
|
||||
private async Task Init()
|
||||
private async UniTask Init()
|
||||
{
|
||||
await UnityServices.InitializeAsync();
|
||||
if (!AuthenticationService.Instance.IsSignedIn)
|
||||
|
||||
@@ -51,7 +51,6 @@ public class Platform : MonoBehaviour, IPlatform
|
||||
if(other.CompareTag("Player") && !hasAchievedScore)
|
||||
{
|
||||
hasAchievedScore = true;
|
||||
Debug.Log("Score Increased");
|
||||
IscoreService.AddScore();
|
||||
IaudioController.PlayScoredSound();
|
||||
_particleSystem.Play();
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
"GUID:4307f53044263cf4b835bd812fc161a4",
|
||||
"GUID:5540e30183c82e84b954c033c388e06c",
|
||||
"GUID:2073209246492244c9ad62c89d8d37bb",
|
||||
"GUID:fe25561d224ed4743af4c60938a59d0b"
|
||||
"GUID:fe25561d224ed4743af4c60938a59d0b",
|
||||
"GUID:f51ebe6a0ceec4240a699833d6309b23"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
|
||||
@@ -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