Implement player network spawning and position synchronization

This commit is contained in:
2024-08-25 17:43:19 +02:00
parent 6e037b4d06
commit b05cab8288
30 changed files with 689 additions and 26 deletions

View File

@@ -18,7 +18,7 @@ public class SceneManager : MonoBehaviour
[Inject]
[ReadOnly]
[SerializeField]
private HVRPlayerController playerController;
private GameManager gameManager;
[ReadOnly]
[SerializeField]
@@ -36,7 +36,7 @@ public class SceneManager : MonoBehaviour
private IEnumerator SwitchToScene(Scene scene)
{
playerController.ScreenFader.Fade(1, fadeDuration);
gameManager.LocalPlayer.FadeScreen(1, fadeDuration);
var operation = UnityEngine.SceneManagement.SceneManager
.LoadSceneAsync((int)scene);
@@ -55,6 +55,6 @@ public class SceneManager : MonoBehaviour
this.scene = scene;
playerController.ScreenFader.Fade(0, fadeDuration);
gameManager.LocalPlayer.FadeScreen(0, fadeDuration);
}
}