-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathButtonPromptManager.cs
More file actions
100 lines (78 loc) · 2.51 KB
/
ButtonPromptManager.cs
File metadata and controls
100 lines (78 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ButtonPromptManager : MonoBehaviour
{
public ButtonPrompt LeftClick;
public ButtonPrompt RightClick;
public ButtonPrompt MouseWheel;
public ButtonPrompt Space;
public ButtonPrompt EscapeKey;
public InteractiveTextContainer ThoughtBubble;
private bool _overwriteInteract = false;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (GameManager.CurrentScene.Equals(GameManager.Scene.Tutorial) || GameManager.CurrentScene.Equals(GameManager.Scene.Cabin))
{
LeftClick.SetText("Interact");
RightClick.Deactivate();
EscapeKey.SetText("Pause Game");
}
if (!_overwriteInteract)
{
LeftClick.SetText("Interact");
}
if (GameManager.CurrentScene.Equals(GameManager.Scene.Camera))
{
RightClick.SetText("Zoom Out");
Space.SetText("Take Photo");
EscapeKey.SetText("Return to Cabin");
}
if (HandManager.Currently.Equals(HandManager.state.HoldingRadio) && !DialogueManager.InDialogue)
{
MouseWheel.SetText("Adjust Frequency");
}
if (CombineManager.InCombineMode)
{
LeftClick.SetText("Combine");
}
if (PeachManager.InUI)
{
LeftClick.SetText("Interact");
RightClick.SetText("Stop Inspecting");
MouseWheel.Deactivate();
EscapeKey.SetText("Stop Inspecting");
}
if (DialogueManager.InDialogue || (ThoughtBubble != null && ThoughtBubble.DialogueMode))
{
LeftClick.SetText("Interact");
RightClick.Deactivate();
MouseWheel.Deactivate();
EscapeKey.Deactivate();
}
if (MovementManager.CamLocked)
{
Space.Deactivate();
}
if (PhotoAlbum.AlbumOpen)
{
LeftClick.Deactivate();
RightClick.SetText("Close Album");
EscapeKey.SetText("Close Album");
}
}
public void ChangeInteractText(string text)
{
LeftClick.SetText(text);
_overwriteInteract = true;
}
public void ResetInteractText()
{
_overwriteInteract = false;
}
}