Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added Assets/Diving Simulation/.DS_Store
Binary file not shown.
834 changes: 726 additions & 108 deletions Assets/Diving Simulation/Scenes/Simulation.unity

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions Assets/Diving Simulation/Scripts/CrewmateNames.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TMPro;

public class CrewmateNames : MonoBehaviour
{

public CallTowerManager ctm;
private Text textBox;
private TextMeshPro textBox;

// Start is called before the first frame update
void Start()
{
textBox = this.GetComponent<Text>();
textBox = this.GetComponent<TextMeshPro>();
}

// Update is called once per frame
Expand All @@ -25,7 +26,8 @@ void Update()
{
string currName = currCrewmate.name;
string currPosition = currCrewmate.worldLocation.ToString();
crewText = crewText + currName + " " + currPosition + "\n";
string currFrequency = currCrewmate.frequency.ToString();
crewText = crewText + currName + " " + currPosition + " 📞: " + currFrequency +"\n";
}

textBox.text = crewText;
Expand Down
26 changes: 22 additions & 4 deletions Assets/Diving Simulation/Scripts/OxygenBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
using UnityEngine;
using UnityEngine.UI;

[RequireComponent(typeof(Slider))]
[RequireComponent(typeof (Slider))]
public class OxygenBar : MonoBehaviour
{

private Slider slider;

public InformationManager iM;

// Start is called before the first frame update
Expand All @@ -17,19 +17,37 @@ void Start()
SetMaxOxygenLevel(iM.GetMaxOxygenLevel());
}

public void SetMaxOxygenLevel (float maxLevel)
public void SetMaxOxygenLevel(float maxLevel)
{
slider.maxValue = maxLevel;
slider.value = maxLevel; // Start with max!
}

public void SetOxygenLevel (float level)
public void SetOxygenLevel(float level)
{
slider.value = level;
}

private void Update()
{
SetOxygenLevel(iM.GetOxygenLevel());
if (iM.GetOxygenLevel() < 80 && iM.GetOxygenLevel() > 20)
{
slider
.gameObject
.transform
.Find("Fill")
.GetComponent<Image>()
.color = new Color(1F, 0.3F, 0F);
}
else if (iM.GetOxygenLevel() < 20)
{
slider
.gameObject
.transform
.Find("Fill")
.GetComponent<Image>()
.color = Color.red;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using UnityEngine;

public class ToggleTracking : MonoBehaviour
public class ToggleTrackingLeft : MonoBehaviour
{

public bool trackOculusLeftHand = true;
Expand Down
25 changes: 25 additions & 0 deletions Assets/Diving Simulation/Scripts/ToggleTrackingRight.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ToggleTrackingRight : MonoBehaviour
{

public bool trackOculusRightHand = true;
public Transform OculusRightHand;

// Start is called before the first frame update
void Start()
{
}

// Update is called once per frame
void Update()
{
if (trackOculusRightHand)
{
transform.position = OculusRightHand.position;
transform.rotation = OculusRightHand.rotation;
}
}
}
11 changes: 11 additions & 0 deletions Assets/Diving Simulation/Scripts/ToggleTrackingRight.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ Material:
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.8207547, g: 0.15227835, b: 0.15227835, a: 1}
- _Color: {r: 0.8207547, g: 0.1522783, b: 0.1522783, a: 1}
- _BaseColor: {r: 1, g: 0, b: 0.10395098, a: 1}
- _Color: {r: 1, g: 0, b: 0.103950955, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1457147757671748}
m_IsPrefabParent: 1
--- !u!1 &1457147757671748
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4435288314474964}
- component: {fileID: 20853760230088964}
- component: {fileID: 124912211786574086}
- component: {fileID: 6880100639039534597}
m_Layer: 0
m_Name: OverlayUICamera
m_TagString: Untagged
Expand All @@ -30,27 +21,36 @@ GameObject:
m_IsActive: 1
--- !u!4 &4435288314474964
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1457147757671748}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!20 &20853760230088964
Camera:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1457147757671748}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 0.503, g: 0.497, b: 0.509, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
Expand Down Expand Up @@ -79,8 +79,42 @@ Camera:
m_StereoSeparation: 0.022
--- !u!124 &124912211786574086
Behaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1457147757671748}
m_Enabled: 1
--- !u!114 &6880100639039534597
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1457147757671748}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_RenderShadows: 1
m_RequiresDepthTextureOption: 2
m_RequiresOpaqueTextureOption: 2
m_CameraType: 0
m_Cameras: []
m_RendererIndex: -1
m_VolumeLayerMask:
serializedVersion: 2
m_Bits: 1
m_VolumeTrigger: {fileID: 0}
m_VolumeFrameworkUpdateModeOption: 2
m_RenderPostProcessing: 0
m_Antialiasing: 0
m_AntialiasingQuality: 2
m_StopNaN: 0
m_Dithering: 0
m_ClearDepth: 1
m_AllowXRRendering: 1
m_RequiresDepthTexture: 0
m_RequiresColorTexture: 0
m_Version: 2
8 changes: 8 additions & 0 deletions Assets/TextMesh Pro.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/TextMesh Pro/Documentation.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/TextMesh Pro/Examples & Extras.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/TextMesh Pro/Examples & Extras/Fonts.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading