ИИ гонщиков, запуск, перезапуск игры и пр
This commit is contained in:
1 parent
f557c58c9d
commit
efcfaae647
48 files changed
+1486
-212
No files matched your search
@@ -1,13 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Code.Example.Race.Racer;
|
||||
using Code.Example.Race.Track;
|
||||
using Code.Infrastructure.EventBus;
|
||||
using Code.Infrastructure.UI;
|
||||
using Reflex.Attributes;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Example.Race.UI
|
||||
{
|
||||
@@ -25,24 +22,22 @@ namespace Code.Example.Race.UI
|
||||
public override void Open(Action callback = null)
|
||||
{
|
||||
playerScore.gameObject.SetActive(true);
|
||||
callback?.Invoke();
|
||||
// image.DOColor(shownColor, 1f).onComplete = () => callback?.Invoke();
|
||||
}
|
||||
|
||||
public override void Close(Action callback = null)
|
||||
{
|
||||
playerScore.gameObject.SetActive(true);
|
||||
playerScore.gameObject.SetActive(false);
|
||||
callback?.Invoke();
|
||||
// image.DOColor(hiddenColor, 1f).onComplete += () => callback?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
public void OnRacerPassedCheckpoint(Racer.Racer racer)
|
||||
{
|
||||
}
|
||||
|
||||
public void ScoreChanged(Racer.Racer racer, int additionalScore, List<KeyValuePair<Racer.Racer,int>> scores)
|
||||
public void ScoreChanged(Racer.Racer racer, ScoreData additionalScore, List<KeyValuePair<Racer.Racer,ScoreData>> scores)
|
||||
{
|
||||
// if (racer.Data.type == RacerType.Player)
|
||||
string output = "";
|
||||
foreach (var score in scores) output += $@"{score.Key.Data.name}: {score.Value}\n";
|
||||
foreach (var score in scores) output += $@"{score.Key.Data.name}: {score.Value.lapsPassed} \t {score.Value.checkpointsPassed}\n";
|
||||
playerScore.text = output;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user