Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Assets/1.TeamWorkspace/Ann
Assets/1.TeamWorkspace/Amee
Assets/1.TeamWorkspace/Sopha
Assets/1.TeamWorkspace/Boy
Assets/1.TeamWorkspace/Phettae

# This .gitignore file should be placed at the root of your Unity project directory
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ protected override void OtherUpdate()
Dictionary<string, string> args = new Dictionary<string, string> {
{"id", ConnectionManager.Instance.GetConnectionId()},
{"mes", mes},
{"score_val", GameManager.instance.score.ToString()},
{"score_val", CurrentScore().ToString()},
{"name_val", "NIGG"}
};
Debug.Log("sent to GAMA: " + mes);
Expand All @@ -28,6 +28,13 @@ protected override void OtherUpdate()
message = null;
}
}
// The bridge sits in both module scenes: Module 1 has GameManager, Module 2 has M2Manager.
static int CurrentScore()
{
if (GameManager.instance != null) return GameManager.instance.score;
if (M2Manager.Instance != null) return M2Manager.Instance.score;
return 0;
}
public class GAMAMessages
{
public int cycle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ private void Start()
}
public IEnumerator Fill()
{
yield return new WaitUntil(()=>GameManager.instance.IsRain);
// Shared prefabs carry this script into Module 2, which has no GameManager: wait instead of throwing.
yield return new WaitUntil(() => GameManager.instance != null && GameManager.instance.IsRain);
WaterOBJ.SetActive(true);
isFill = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3114,7 +3114,6 @@ GameObject:
m_Component:
- component: {fileID: 326674666}
- component: {fileID: 326674663}
- component: {fileID: 326674665}
- component: {fileID: 326674664}
m_Layer: 7
m_Name: CameraUI
Expand Down Expand Up @@ -3218,14 +3217,6 @@ MonoBehaviour:
m_VarianceClampScale: 0.9
m_ContrastAdaptiveSharpening: 0
m_Version: 2
--- !u!81 &326674665
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 326674662}
m_Enabled: 1
--- !u!4 &326674666
Transform:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -3774,6 +3765,11 @@ GameObject:
m_CorrespondingSourceObject: {fileID: 2723373030106347489, guid: dacd338a3ef0e194bb382d72ad058119, type: 3}
m_PrefabInstance: {fileID: 2507683916883717659}
m_PrefabAsset: {fileID: 0}
--- !u!1 &401769911 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 2379950430341512700, guid: dacd338a3ef0e194bb382d72ad058119, type: 3}
m_PrefabInstance: {fileID: 2507683916883717659}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &404140305
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -16327,7 +16323,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::SendRecieveData
primaryRightHandButton: {fileID: 0}
player: {fileID: 0}
player: {fileID: 401769911}
Ground: {fileID: 7290993179999183354, guid: 7b886bd7aa09cc246875597729385633, type: 3}
--- !u!114 &1380034232
MonoBehaviour:
Expand Down Expand Up @@ -16357,7 +16353,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::SendReceiveMessageExample
primaryRightHandButton: {fileID: 0}
player: {fileID: 0}
player: {fileID: 401769911}
Ground: {fileID: 0}
--- !u!1001 &1388699124
PrefabInstance:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
using UnityEngine.InputSystem;
using UnityEngine;
using UnityEngine.XR;
using UnityEngine.iOS;
using UnityEngine.tvOS;
public class InputVR : MonoBehaviour
{
public UnityEngine.XR.InputDevice _rightController;
Expand All @@ -28,17 +26,14 @@ private void InitializeInputDevices()
if (!_rightController.isValid)
{
InitializeInputDevice(InputDeviceCharacteristics.Controller | InputDeviceCharacteristics.Right, ref _rightController);
print("A");
}
if (!_leftController.isValid)
{
InitializeInputDevice(InputDeviceCharacteristics.Controller | InputDeviceCharacteristics.Left, ref _leftController);
print("S");
}
if (!_HMD.isValid)
{
InitializeInputDevice(InputDeviceCharacteristics.HeadMounted, ref _HMD);
print("D");
}

}
Expand Down
2 changes: 1 addition & 1 deletion ProjectSettings/EditorBuildSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ EditorBuildSettings:
path: Assets/1.TeamWorkspace/GameTesting/Scene/Module_1_MainScene.unity
guid: 69e69fcaf6fe326439ca73d9fc683741
- enabled: 1
path: Assets/1.TeamWorkspace/Phettae/Scene/Module_2_MainScene.unity
path: Assets/1.TeamWorkspace/Module2/Scene/Module_2_MainScene.unity
guid: 35c87c2dd13eadf4ba7464dde81e7162
- enabled: 0
path: Assets/Scenes/Scenes by Simple/Code Examples/Receive Water Data.unity
Expand Down
Loading