Working via NetworkManager
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
namespace Marro.PacManUdon
|
||||
{
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
using VRC.SDKBase;
|
||||
using VRC.Udon;
|
||||
using UnityEngine;
|
||||
|
||||
public class ScoreBonusDisplay : UdonSharpBehaviour
|
||||
namespace Marro.PacManUdon
|
||||
{
|
||||
[RequireComponent(typeof(Animator))]
|
||||
public class ScoreBonusDisplay : SyncedObject
|
||||
{
|
||||
private Animator animator;
|
||||
private float countdownSeconds;
|
||||
@@ -18,11 +16,11 @@
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
void Update()
|
||||
public override void SyncedUpdate()
|
||||
{
|
||||
if (countingDown)
|
||||
{
|
||||
countdownSeconds -= Time.deltaTime;
|
||||
countdownSeconds -= networkManager.SyncedDeltaTime;
|
||||
if (countdownSeconds <= 0)
|
||||
{
|
||||
Hide();
|
||||
@@ -48,5 +46,15 @@
|
||||
countingDown = false;
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public override void AppendSyncedData(byte[][] data, ref int index, NetworkEventType eventType)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override bool SetSyncedData(byte[] data, ref int index, NetworkEventType eventType)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user