Compare commits
No commits in common. "a1dd3f01519383c1003b4b7b06119e6204467d05" and "a64ce8c7ac7539a090276343bd002c01b2edbd05" have entirely different histories.
a1dd3f0151
...
a64ce8c7ac
41
Assets/Scripts/ShowPlayerVote.cs
Normal file
41
Assets/Scripts/ShowPlayerVote.cs
Normal file
@ -0,0 +1,41 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
public class ShowPlayerVote : MonoBehaviour
|
||||
{
|
||||
|
||||
public List<GameObject> playersPrefab = new List<GameObject>();
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void ShowBlockWithPlayerName(List<Player> _votedPlayers)
|
||||
{
|
||||
if (playersPrefab.Count < _votedPlayers.Count) return;
|
||||
|
||||
for(int i =0; i < _votedPlayers.Count; i++)
|
||||
{
|
||||
Player player = _votedPlayers[i];
|
||||
if(player != null)
|
||||
{
|
||||
playersPrefab[i].SetActive(true);
|
||||
playersPrefab[i].GetComponentInChildren<TextMeshProUGUI>().text = player.name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
11
Assets/Scripts/ShowPlayerVote.cs.meta
Normal file
11
Assets/Scripts/ShowPlayerVote.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 05b4874bb9b57a54b970657c1f84d653
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -73,7 +73,7 @@ private void RunDeleteTasks(List<Task> deleteTasks, Action callback_OnFinish)
|
||||
int taskCount = deleteTasks.Count;
|
||||
Debug.Log($"There are {taskCount} files to delete", this);
|
||||
|
||||
Task.WhenAll(deleteTasks).ContinueWithOnMainThread(_ =>
|
||||
Task.WhenAll(deleteTasks).ContinueWith(_ =>
|
||||
{
|
||||
Debug.Log($"all delete tasks are done", this);
|
||||
callback_OnFinish?.Invoke();
|
||||
|
Loading…
Reference in New Issue
Block a user