diff --git a/RunningLateGame/Assets/Prefabs/lift.prefab b/RunningLateGame/Assets/Prefabs/lift.prefab
index 1895cfc..28a7fc2 100644
--- a/RunningLateGame/Assets/Prefabs/lift.prefab
+++ b/RunningLateGame/Assets/Prefabs/lift.prefab
@@ -190,7 +190,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 3a46a62138bd3774aa62b76560629f46, type: 3}
m_Name:
m_EditorClassIdentifier:
- interactionPrompt: press [E] to open lift door
+ interactionPrompt:
door: {fileID: 0}
liftController: {fileID: 0}
--- !u!65 &6504267406812371461
diff --git a/RunningLateGame/Assets/Scripts/Door.cs b/RunningLateGame/Assets/Scripts/Door.cs
index 73460a3..6460abe 100644
--- a/RunningLateGame/Assets/Scripts/Door.cs
+++ b/RunningLateGame/Assets/Scripts/Door.cs
@@ -48,6 +48,14 @@ public enum DoorType
///
[HideInInspector] public bool opening;
+ ///
+ /// set the interaction prompt
+ ///
+ private void Awake()
+ {
+ interactionPrompt = "Press [E] to open the door";
+ }
+
///
/// to interact with the door
///
diff --git a/RunningLateGame/Assets/Scripts/LiftDoorController.cs b/RunningLateGame/Assets/Scripts/LiftDoorController.cs
index ee9426e..6815c03 100644
--- a/RunningLateGame/Assets/Scripts/LiftDoorController.cs
+++ b/RunningLateGame/Assets/Scripts/LiftDoorController.cs
@@ -21,6 +21,14 @@ public class LiftDoorController : CommonInteractable
///
[SerializeField] private LiftController liftController;
+ ///
+ /// set the interaction prompt
+ ///
+ private void Awake()
+ {
+ interactionPrompt = "Press [E] to call the lift";
+ }
+
///
/// to call the open door function
///
diff --git a/RunningLateGame/Assets/Scripts/PlaygroundDonut.cs b/RunningLateGame/Assets/Scripts/PlaygroundDonut.cs
index c39c859..0da645b 100644
--- a/RunningLateGame/Assets/Scripts/PlaygroundDonut.cs
+++ b/RunningLateGame/Assets/Scripts/PlaygroundDonut.cs
@@ -4,20 +4,26 @@
* description: interaction prompt demo with a probuilder donut
*/
-using UnityEngine;
-
///
/// demo donut interactable class
///
public class PlaygroundDonut : CommonInteractable
{
- private void OnTriggerEnter(Collider other)
+ ///
+ /// set the interaction prompt
+ ///
+ private void Awake()
{
- GameManager.Instance.SetInteractionPrompt("This is a Donut");
+ interactionPrompt = "This is a Donut";
}
- private void OnTriggerExit(Collider other)
- {
- GameManager.Instance.ClearInteractionPrompt();
- }
+ // private void OnTriggerEnter(Collider other)
+ // {
+ // GameManager.Instance.SetInteractionPrompt("This is a Donut");
+ // }
+ //
+ // private void OnTriggerExit(Collider other)
+ // {
+ // GameManager.Instance.ClearInteractionPrompt();
+ // }
}
\ No newline at end of file