QuickPatch
This commit is contained in:
parent
801dcd3d66
commit
a2fcdb9d07
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0400e5e5779425c40ba3164b1e0b5b59
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -69,7 +69,10 @@ public class BloodComputeShader : MonoBehaviour
|
|||
return;
|
||||
}
|
||||
Instance = this;
|
||||
|
||||
GameManager.OnPlayersReady += OnPlayersReady;
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
ComputeHelper.CreateStructuredBuffer<Droplet>(ref particleBuffer, numParticles);
|
||||
|
@ -130,6 +133,12 @@ public class BloodComputeShader : MonoBehaviour
|
|||
freeBloodReadRequest = AsyncGPUReadback.Request(freeParticleBuffer);
|
||||
}
|
||||
|
||||
void OnPlayersReady(GameObject[] players)
|
||||
{
|
||||
mop1 = players[0].GetComponent<Mop>();
|
||||
mop2 = players[1].GetComponent<Mop>();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
"name": "Project.Scripts.Blood",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f"
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f",
|
||||
"GUID:c0e1b40f519e6e84b8f4af9930403ecb"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
{
|
||||
"name": "Project.Scripts.Manager",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f",
|
||||
"GUID:0ba5c175a7b2c8345a4e996560a9d0ab",
|
||||
"GUID:2ea4a18a75f268848b43865100892489",
|
||||
"GUID:055e16077a1232f4780a04598b3bfe00",
|
||||
"GUID:1031dfc67c8f1a645b71d679ac3bf7db"
|
||||
],
|
||||
"references": [],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
|
|
|
@ -9,6 +9,7 @@ using TMPro;
|
|||
using Unity.Netcode;
|
||||
using Unity.Netcode.Transports.UTP;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class SteamManager : ZNetworkData
|
||||
|
@ -90,7 +91,11 @@ public class SteamManager : ZNetworkData
|
|||
{
|
||||
if (!NetworkManager.Singleton.IsHost) return;
|
||||
|
||||
NetworkManager.Singleton.SceneManager.LoadScene("Multiplayer", UnityEngine.SceneManagement.LoadSceneMode.Single);
|
||||
// Gets next scene name
|
||||
int nextSceneIndex = SceneManager.GetActiveScene().buildIndex + 1;
|
||||
string nextSceneName = SceneUtility.GetScenePathByBuildIndex(nextSceneIndex);
|
||||
|
||||
NetworkManager.Singleton.SceneManager.LoadScene(nextSceneName, UnityEngine.SceneManagement.LoadSceneMode.Single);
|
||||
}
|
||||
|
||||
private void UpdateUI()
|
||||
|
|
Loading…
Reference in New Issue