Skip to content

Commit

Permalink
bug fixes #199 #168 #170 #182
Browse files Browse the repository at this point in the history
  • Loading branch information
ClarkRM committed Apr 21, 2024
1 parent 58adf93 commit 3a2bcd6
Show file tree
Hide file tree
Showing 8 changed files with 129 additions and 7 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 14 additions & 1 deletion Assets/Scenes/RC1 Levels/RobbieLevel1.unity
Original file line number Diff line number Diff line change
Expand Up @@ -2744,7 +2744,7 @@ Canvas:
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingLayerID: -2088478841
m_SortingOrder: 4
m_TargetDisplay: 0
--- !u!224 &1009890724
Expand Down Expand Up @@ -3011,6 +3011,7 @@ MonoBehaviour:
panel: {fileID: 1596906307}
prompt: {fileID: 2020762041}
door: {fileID: 1684721029}
wireManager: {fileID: 1783700600}
--- !u!61 &1037877793
BoxCollider2D:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -13754,6 +13755,17 @@ Transform:
m_CorrespondingSourceObject: {fileID: 8804528637203730747, guid: e39dac7e96b835642822a87fd25be996, type: 3}
m_PrefabInstance: {fileID: 1783700598}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1783700600 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7063120352788213658, guid: e39dac7e96b835642822a87fd25be996, type: 3}
m_PrefabInstance: {fileID: 1783700598}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0095cb85b62836e42b0708d432056b79, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1901405300
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -15138,6 +15150,7 @@ MonoBehaviour:
pauseMenu: {fileID: 1781823965}
controlsMenu: {fileID: 1715118698}
optionsMenu: {fileID: 1772973575}
startGravity: {x: 0, y: 0}
--- !u!4 &1945081253
Transform:
m_ObjectHideFlags: 0
Expand Down
79 changes: 77 additions & 2 deletions Assets/Scenes/RC1 Levels/RobbieLevel2.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1366,6 +1366,10 @@ PrefabInstance:
propertyPath: prompt
value:
objectReference: {fileID: 1118800628}
- target: {fileID: 914625022388772637, guid: a4ba9236517353941a3e5d769fd88592, type: 3}
propertyPath: wireManager
value:
objectReference: {fileID: 1128912038}
- target: {fileID: 7136180995822968546, guid: a4ba9236517353941a3e5d769fd88592, type: 3}
propertyPath: m_LocalPosition.x
value: 4.84
Expand Down Expand Up @@ -1573,6 +1577,10 @@ PrefabInstance:
propertyPath: prompt
value:
objectReference: {fileID: 1118800628}
- target: {fileID: 914625022388772637, guid: a4ba9236517353941a3e5d769fd88592, type: 3}
propertyPath: wireManager
value:
objectReference: {fileID: 514157997}
- target: {fileID: 7136180995822968546, guid: a4ba9236517353941a3e5d769fd88592, type: 3}
propertyPath: m_LocalPosition.x
value: -2.268732
Expand Down Expand Up @@ -17149,6 +17157,17 @@ GameObject:
m_CorrespondingSourceObject: {fileID: 5144518458085613159, guid: e39dac7e96b835642822a87fd25be996, type: 3}
m_PrefabInstance: {fileID: 514157994}
m_PrefabAsset: {fileID: 0}
--- !u!114 &514157997 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7063120352788213658, guid: e39dac7e96b835642822a87fd25be996, type: 3}
m_PrefabInstance: {fileID: 514157994}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0095cb85b62836e42b0708d432056b79, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &521422614 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2747708874086443088, guid: ae42a99ad482f1f42a96c8a0d612577e, type: 3}
Expand Down Expand Up @@ -22670,6 +22689,17 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e39dac7e96b835642822a87fd25be996, type: 3}
--- !u!114 &860058007 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7063120352788213658, guid: e39dac7e96b835642822a87fd25be996, type: 3}
m_PrefabInstance: {fileID: 860058006}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0095cb85b62836e42b0708d432056b79, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &866187602
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -23007,7 +23037,7 @@ Canvas:
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingLayerID: -2088478841
m_SortingOrder: 4
m_TargetDisplay: 0
--- !u!1 &897632408
Expand Down Expand Up @@ -23398,6 +23428,17 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e39dac7e96b835642822a87fd25be996, type: 3}
--- !u!114 &1003053178 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7063120352788213658, guid: e39dac7e96b835642822a87fd25be996, type: 3}
m_PrefabInstance: {fileID: 1003053177}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0095cb85b62836e42b0708d432056b79, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1008952071
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -23866,6 +23907,10 @@ PrefabInstance:
propertyPath: prompt
value:
objectReference: {fileID: 1118800628}
- target: {fileID: 914625022388772637, guid: a4ba9236517353941a3e5d769fd88592, type: 3}
propertyPath: wireManager
value:
objectReference: {fileID: 1003053178}
- target: {fileID: 7136180995822968546, guid: a4ba9236517353941a3e5d769fd88592, type: 3}
propertyPath: m_LocalPosition.x
value: -10.709999
Expand Down Expand Up @@ -23949,6 +23994,10 @@ PrefabInstance:
propertyPath: prompt
value:
objectReference: {fileID: 1118800628}
- target: {fileID: 914625022388772637, guid: a4ba9236517353941a3e5d769fd88592, type: 3}
propertyPath: wireManager
value:
objectReference: {fileID: 860058007}
- target: {fileID: 7136180995822968546, guid: a4ba9236517353941a3e5d769fd88592, type: 3}
propertyPath: m_LocalPosition.x
value: -16.71
Expand Down Expand Up @@ -31446,7 +31495,7 @@ RectTransform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1118800628}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalPosition: {x: 0, y: 0, z: 1}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
Expand Down Expand Up @@ -31663,6 +31712,17 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e39dac7e96b835642822a87fd25be996, type: 3}
--- !u!114 &1128912038 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7063120352788213658, guid: e39dac7e96b835642822a87fd25be996, type: 3}
m_PrefabInstance: {fileID: 1128912037}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0095cb85b62836e42b0708d432056b79, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1151170691
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -35097,6 +35157,17 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e39dac7e96b835642822a87fd25be996, type: 3}
--- !u!114 &1989045862 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7063120352788213658, guid: e39dac7e96b835642822a87fd25be996, type: 3}
m_PrefabInstance: {fileID: 1989045861}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0095cb85b62836e42b0708d432056b79, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &2028649723
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -35979,6 +36050,10 @@ PrefabInstance:
propertyPath: prompt
value:
objectReference: {fileID: 1118800628}
- target: {fileID: 914625022388772637, guid: a4ba9236517353941a3e5d769fd88592, type: 3}
propertyPath: wireManager
value:
objectReference: {fileID: 1989045862}
- target: {fileID: 1821866787272545077, guid: a4ba9236517353941a3e5d769fd88592, type: 3}
propertyPath: m_SpriteTilingProperty.oldSize.x
value: 1
Expand Down
15 changes: 14 additions & 1 deletion Assets/Scenes/RC1 Levels/RobbieLevel3.unity
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ MonoBehaviour:
panel: {fileID: 1426223237}
prompt: {fileID: 143031840}
door: {fileID: 1091036945}
wireManager: {fileID: 1426223239}
--- !u!61 &112764426
BoxCollider2D:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -8240,6 +8241,7 @@ MonoBehaviour:
pauseMenu: {fileID: 1455941528}
controlsMenu: {fileID: 1637730155}
optionsMenu: {fileID: 1441853624}
startGravity: {x: 0, y: 0}
--- !u!4 &618350727
Transform:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -9294,7 +9296,7 @@ Canvas:
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingLayerID: -2088478841
m_SortingOrder: 4
m_TargetDisplay: 0
--- !u!224 &1036198874
Expand Down Expand Up @@ -12040,6 +12042,17 @@ Transform:
m_CorrespondingSourceObject: {fileID: 8804528637203730747, guid: e39dac7e96b835642822a87fd25be996, type: 3}
m_PrefabInstance: {fileID: 1426223236}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1426223239 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7063120352788213658, guid: e39dac7e96b835642822a87fd25be996, type: 3}
m_PrefabInstance: {fileID: 1426223236}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0095cb85b62836e42b0708d432056b79, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1441853624
GameObject:
m_ObjectHideFlags: 0
Expand Down
3 changes: 2 additions & 1 deletion Assets/Scripts/Robbie Minigame/Attempt2/WireManager2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

public class WireManager2 : MonoBehaviour
{
List<bool> connections;
public List<bool> connections;
[SerializeField] int numWires = 4;
[SerializeField] GameObject GO;
[SerializeField] GameObject Panel;
Expand All @@ -25,6 +25,7 @@ void Update()
if(GO.GetComponent<Laser>() != null)
{
GO.GetComponent<Laser>().enabled = false;
GO.GetComponent<LineRenderer>().positionCount = 0;
GO.GetComponent<LineRenderer>().enabled = false;
}
// if not a laser, remove object
Expand Down
24 changes: 22 additions & 2 deletions Assets/Scripts/Robbie Minigame/Attempt2/WirePanel.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;

public class WirePanel : MonoBehaviour
Expand All @@ -8,8 +9,11 @@ public class WirePanel : MonoBehaviour
[SerializeField] GameObject panel;
[SerializeField] GameObject prompt;
[SerializeField] GameObject door;
[SerializeField] WireManager2 wireManager;
private bool inRange = false;
private bool inPanel = false;
private bool hasCompleted = false;

void Update()
{
if (door.activeInHierarchy)
Expand All @@ -36,12 +40,28 @@ void Update()
// sr.enabled = true;
}

if(wireManager.connections.Count == 4)
{
hasCompleted = true;
}

if(hasCompleted)
{
prompt.GetComponent<TMP_Text>().text = "";
}
else
{
prompt.GetComponent<TMP_Text>().text = "Press [E] to access Wires";
}
}

private void OnTriggerEnter2D(Collider2D collision)
{
prompt.SetActive(true);
inRange = true;
if (!hasCompleted)
{
prompt.SetActive(true);
inRange = true;
}
}

private void OnTriggerExit2D(Collider2D collision)
Expand Down

0 comments on commit 3a2bcd6

Please sign in to comment.