Pacman syncs really well now
This commit is contained in:
@@ -1,13 +1,8 @@
|
||||
#define RECORDING_DEMO
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Marro.PacManUdon
|
||||
{
|
||||
using System;
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
using VRC.SDK3.Components;
|
||||
using VRC.SDKBase;
|
||||
|
||||
public partial class GameManager : SyncedObject
|
||||
{
|
||||
[Header("Static game components")]
|
||||
@@ -16,7 +11,7 @@ namespace Marro.PacManUdon
|
||||
[SerializeField] private GhostManager ghostManager;
|
||||
[SerializeField] private BonusFruit bonusFruit;
|
||||
[SerializeField] private PelletManager pelletManager;
|
||||
[SerializeField] public StatusDisplay statusDisplay; // This one is public so other scripts can write to the debug display
|
||||
[SerializeField] private StatusDisplay statusDisplay;
|
||||
[SerializeField] private PelletManager attractScreen;
|
||||
[SerializeField] private GameObject intermissionScreen;
|
||||
[SerializeField] private GameObject pressStartButtonScreen;
|
||||
@@ -68,7 +63,7 @@ namespace Marro.PacManUdon
|
||||
intermission2Pole = intermissionScreenElements[4].GetComponent<Intermission2Pole>();
|
||||
|
||||
networkManager.Initialize();
|
||||
ghostManager.Initialize(maze.ghostTargets, pacMan, this);
|
||||
ghostManager.Initialize(maze.ghostStarts, maze.ghostTargets, pacMan, this);
|
||||
pacMan.Initialize(playerInput, maze.pacManStart, this);
|
||||
bonusFruit.Initialize();
|
||||
pelletManager.Initialize();
|
||||
@@ -114,7 +109,7 @@ namespace Marro.PacManUdon
|
||||
Debug.Log($"{gameObject} Start Game Button was pressed!");
|
||||
if (networkManager.IsOwner)
|
||||
{
|
||||
networkManager.SendEvent(NetworkEventType.StartGameButtonPressed);
|
||||
networkManager.SendEventNow(NetworkEventType.StartGameButtonPressed);
|
||||
}
|
||||
StartTimeSequence(PacManTimeSequence.StartNewGame);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user