mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-09-08 18:35:18 -05:00
Fixed bug with ui on networked
-chagne cool down script to call a function to populate player canvas -Added populate call to three network scripts
This commit is contained in:
@@ -38,8 +38,9 @@ public class SpawnManager : NetworkBehaviour {
|
||||
_runner = Instantiate(runnerPrefab, runnersSpawnPoints[runnersSpawned], Quaternion.Euler(0, -90, 0)).gameObject;
|
||||
//Recreate Inventory
|
||||
_runner.GetComponentInChildren<PlayerInventory>().UpdateEquips(playerData.pInv.NetworkItemList, this.gameObject.GetComponent<InventoryManager>().ItemDict);
|
||||
_runner.GetComponentInChildren<CoolDown>().populatePlayerCanvas();
|
||||
_runner.GetComponent<NetworkObject>().SpawnAsPlayerObject(NetworkManager.Singleton.LocalClientId, null, true);
|
||||
|
||||
|
||||
// Increment runners
|
||||
runnersSpawned++;
|
||||
}
|
||||
@@ -115,6 +116,7 @@ public class SpawnManager : NetworkBehaviour {
|
||||
List<string> itemList = itemsAsString.Split(',').ToList();
|
||||
|
||||
character.GetComponentInChildren<PlayerInventory>().UpdateEquips(itemList, this.gameObject.GetComponent<InventoryManager>().ItemDict);
|
||||
character.GetComponentInChildren<CoolDown>().populatePlayerCanvas();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user