- Added victory music to round 2.
- Host card buttons finally properly activate and deactivate during round 2. - Added tags to camera controller errors in each round manager.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
|
||||
using TMPro;
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
using VRC.SDKBase;
|
||||
using VRC.SDK3.Components;
|
||||
using VRC.SDKBase;
|
||||
using VRC.Udon.Common;
|
||||
using TMPro;
|
||||
|
||||
|
||||
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
||||
@@ -84,6 +84,27 @@ public class HostCardManager : UdonSharpBehaviour
|
||||
base.InputJump(Value, Args);
|
||||
}
|
||||
|
||||
public override void InputLookVertical(float Value, UdonInputEventArgs Args)
|
||||
{
|
||||
if (Networking.LocalPlayer.IsUserInVR() && _IsBeingHeld)
|
||||
{
|
||||
_ChangeFontSize_VR((int)Value, Args);
|
||||
}
|
||||
|
||||
base.InputLookVertical(Value, Args);
|
||||
}
|
||||
private void _ChangeFontSize_VR(int Direction, UdonInputEventArgs Args)
|
||||
{
|
||||
if (Direction > 0)
|
||||
{
|
||||
// Increase host card font sizes here later
|
||||
}
|
||||
else if (Direction < 0)
|
||||
{
|
||||
// Decrease host card font sizes here later
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override void OnPickupUseDown()
|
||||
{
|
||||
|
||||
@@ -383,13 +383,13 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _ButtonColourDisabled
|
||||
Data: _ButtonColourLoot
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 21|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _ButtonColourDisabled
|
||||
Data: _ButtonColourLoot
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 18
|
||||
@@ -411,60 +411,12 @@ MonoBehaviour:
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 22|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
- Name:
|
||||
Entry: 13
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _ButtonColourLoot
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 23|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _ButtonColourLoot
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 18
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 18
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
- Name:
|
||||
Entry: 6
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: true
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 24|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 25|UnityEngine.SpaceAttribute, UnityEngine.CoreModule
|
||||
Data: 23|UnityEngine.SpaceAttribute, UnityEngine.CoreModule
|
||||
- Name: height
|
||||
Entry: 4
|
||||
Data: 8
|
||||
@@ -491,7 +443,7 @@ MonoBehaviour:
|
||||
Data: _ButtonColourWarrant
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 26|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 24|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _ButtonColourWarrant
|
||||
@@ -513,6 +465,54 @@ MonoBehaviour:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: true
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 25|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
- Name:
|
||||
Entry: 13
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _ButtonColourCrook
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 26|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _ButtonColourCrook
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 18
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 18
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
- Name:
|
||||
Entry: 6
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: true
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 27|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
@@ -536,19 +536,25 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _ButtonColourCrook
|
||||
Data: _LootButton
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 28|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _ButtonColourCrook
|
||||
Data: _LootButton
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 18
|
||||
Entry: 7
|
||||
Data: 29|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Int32, mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 18
|
||||
Data: 29
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -560,10 +566,10 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: true
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 29|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 30|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
@@ -584,25 +590,19 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _LootButton
|
||||
Data: _WarrantButton
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 30|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 31|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _LootButton
|
||||
Data: _WarrantButton
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 31|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Int32, mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
Entry: 9
|
||||
Data: 29
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 31
|
||||
Data: 29
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -638,19 +638,19 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _WarrantButton
|
||||
Data: _CrookButton
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 33|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _WarrantButton
|
||||
Data: _CrookButton
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 31
|
||||
Data: 29
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 31
|
||||
Data: 29
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -686,19 +686,25 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _CrookButton
|
||||
Data: _DisabledButtons
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 35|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _CrookButton
|
||||
Data: _DisabledButtons
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 31
|
||||
Entry: 7
|
||||
Data: 36|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Boolean[], mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 31
|
||||
Data: 36
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -713,7 +719,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 36|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 37|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
|
||||
using System;
|
||||
using TMPro;
|
||||
using UnityEngine.UI;
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
using VRC.SDKBase;
|
||||
using VRC.Udon;
|
||||
|
||||
|
||||
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
||||
@@ -13,7 +11,6 @@ public class HostCardRecoverTheLootInterface : HostCardInterfaceBase
|
||||
[SerializeField] private TextMeshProUGUI _CommentUI;
|
||||
[Space]
|
||||
public Color _ButtonColourEnabled = Color.white;
|
||||
public Color _ButtonColourDisabled = Color.gray;
|
||||
[Space]
|
||||
public Color _ButtonColourLoot = new Color(0.0f, 1.0f, 1.0f);
|
||||
public Color _ButtonColourWarrant = new Color(1.0f, 1.0f, 0.0f);
|
||||
@@ -23,6 +20,8 @@ public class HostCardRecoverTheLootInterface : HostCardInterfaceBase
|
||||
private int _WarrantButton = -1;
|
||||
private int _CrookButton = -1;
|
||||
|
||||
private bool[] _DisabledButtons;
|
||||
|
||||
|
||||
public void SetComment(string Comment, Color CommentColour)
|
||||
{
|
||||
@@ -37,21 +36,28 @@ public class HostCardRecoverTheLootInterface : HostCardInterfaceBase
|
||||
|
||||
public void DisablePanelButton(int Panel)
|
||||
{
|
||||
ChoiceButtons[Panel - 1].enabled = false;
|
||||
ChoiceButtonImages[Panel - 1].color = _ButtonColourDisabled;
|
||||
int PanelIndex = Panel - 1;
|
||||
|
||||
ChoiceButtons[PanelIndex].enabled = false;
|
||||
_DisabledButtons[PanelIndex] = true;
|
||||
_SetActiveButtonColour(PanelIndex, _DisabledButtons[PanelIndex]);
|
||||
}
|
||||
|
||||
public void EnableAllPanelButtons(bool Enable)
|
||||
public void ActivateAllPanelButtons(bool Activate, bool ResetAllDisabledButtons = false)
|
||||
{
|
||||
for (int i = 0; i < ChoiceButtons.Length; i++)
|
||||
if (ResetAllDisabledButtons)
|
||||
{
|
||||
ChoiceButtons[i].enabled = Enable;
|
||||
ChoiceButtonImages[i].color = Enable ? _ButtonColourEnabled : _ButtonColourDisabled;
|
||||
_DisabledButtons = new bool[ChoiceButtons.Length];
|
||||
}
|
||||
|
||||
if (_LootButton >= 0) ChoiceButtonImages[_LootButton].color = _ButtonColourLoot;
|
||||
if (_WarrantButton >= 0) ChoiceButtonImages[_WarrantButton].color = _ButtonColourWarrant;
|
||||
if (_CrookButton >= 0) ChoiceButtonImages[_CrookButton].color = _ButtonColourCrook;
|
||||
for (int i = 0; i < ChoiceButtons.Length; i++)
|
||||
{
|
||||
ChoiceButtons[i].enabled = !_DisabledButtons[i];
|
||||
if (Activate)
|
||||
_SetActiveButtonColour(i, _DisabledButtons[i]);
|
||||
else
|
||||
_SetActiveButtonColour(i, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,4 +75,17 @@ public class HostCardRecoverTheLootInterface : HostCardInterfaceBase
|
||||
{
|
||||
_CrookButton = (Index - 1) % ChoiceButtons.Length;
|
||||
}
|
||||
|
||||
|
||||
private void _SetActiveButtonColour(int ButtonIndex, bool Disabled)
|
||||
{
|
||||
if (ButtonIndex == _LootButton)
|
||||
ChoiceButtonImages[ButtonIndex].color = _ButtonColourLoot * (Disabled ? 0.5f : 1.0f);
|
||||
else if (ButtonIndex == _WarrantButton)
|
||||
ChoiceButtonImages[ButtonIndex].color = _ButtonColourWarrant * (Disabled ? 0.5f : 1.0f);
|
||||
else if (ButtonIndex == _CrookButton)
|
||||
ChoiceButtonImages[ButtonIndex].color = _ButtonColourCrook * (Disabled ? 0.5f : 1.0f);
|
||||
else
|
||||
ChoiceButtonImages[ButtonIndex].color = _ButtonColourEnabled * (Disabled ? 0.5f : 1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user