- Added an alternate spawn marker, since it was needed for testing anyway. - Round 1 podium name placard now has baked shading. - Fixed umbrella model's blend shape normals. - Removed a lot of unnecessary materials and textures. - KNOWN ISSUE: Winner camera in round 2 no longer follows winner. Again.
53 lines
819 B
C#
53 lines
819 B
C#
|
|
using MMMaellon.LightSync;
|
|
using UdonSharp;
|
|
using UnityEngine;
|
|
using VRC.Udon.Common;
|
|
|
|
|
|
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
|
public class Umbrella : UdonSharpBehaviour
|
|
{
|
|
[SerializeField] Animator _Animator;
|
|
[SerializeField] LightSync _ObjectSync;
|
|
|
|
[UdonSynced] private bool _Open = false;
|
|
|
|
|
|
public override void OnDeserialization(DeserializationResult Result)
|
|
{
|
|
_Open_Synced();
|
|
|
|
base.OnDeserialization(Result);
|
|
}
|
|
|
|
|
|
public override void OnPickupUseDown()
|
|
{
|
|
_Open = !_Open;
|
|
_Open_Synced();
|
|
RequestSerialization();
|
|
|
|
base.OnPickupUseDown();
|
|
}
|
|
|
|
|
|
public void Respawn()
|
|
{
|
|
Open(false);
|
|
_ObjectSync.Respawn();
|
|
}
|
|
|
|
public void Open(bool Open)
|
|
{
|
|
_Open = Open;
|
|
_Open_Synced();
|
|
RequestSerialization();
|
|
}
|
|
|
|
private void _Open_Synced()
|
|
{
|
|
_Animator.SetBool("Open", _Open);
|
|
}
|
|
}
|