mirror of
https://github.com/ConjureETS/ProjectClubCore.git
synced 2026-03-24 09:30:58 +00:00
Removing temporary PlayerList component, removing TMPro from asmdef
This commit is contained in:
parent
a8d7a8e92c
commit
8c5af9e121
@ -1,35 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using TMPro;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
public class PlayerList : MonoBehaviour {
|
|
||||||
HashSet<int> playerIds = new();
|
|
||||||
TMP_Text text;
|
|
||||||
|
|
||||||
void Awake() {
|
|
||||||
text = GetComponent<TMP_Text>();
|
|
||||||
text.text = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetPlayerList(IEnumerable<int> ids) {
|
|
||||||
playerIds.Clear();
|
|
||||||
foreach (int id in ids)
|
|
||||||
playerIds.Add(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Connected(int id) {
|
|
||||||
playerIds.Add(id);
|
|
||||||
UpdateList();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Disconnected(int id) {
|
|
||||||
playerIds.Remove(id);
|
|
||||||
UpdateList();
|
|
||||||
}
|
|
||||||
|
|
||||||
void UpdateList() {
|
|
||||||
text.text = "";
|
|
||||||
foreach (int playerId in playerIds)
|
|
||||||
text.text += $"Player #{playerId}\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 8f4454c6a8ff1f5478829232f04817a5
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -2,8 +2,7 @@
|
|||||||
"name": "Squelette",
|
"name": "Squelette",
|
||||||
"rootNamespace": "Squelette",
|
"rootNamespace": "Squelette",
|
||||||
"references": [
|
"references": [
|
||||||
"GUID:f2ae9fe63a6bc0544986e5b17cf9a8a5",
|
"GUID:f2ae9fe63a6bc0544986e5b17cf9a8a5"
|
||||||
"GUID:6055be8ebefd69e48b49212b09b47b2f"
|
|
||||||
],
|
],
|
||||||
"includePlatforms": [],
|
"includePlatforms": [],
|
||||||
"excludePlatforms": [],
|
"excludePlatforms": [],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user