mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2024-12-27 06:18:52 +00:00
tutorial prompt for ship attach because people are stupid
This commit is contained in:
parent
49e11c15e2
commit
81964da688
@ -19,9 +19,14 @@ public class ShipCustomAttach : MonoBehaviour
|
||||
|
||||
private PlayerAttachPoint _playerAttachPoint;
|
||||
|
||||
/// <summary>
|
||||
/// uses a static field instead of a persistent condition cuz those are synced
|
||||
/// </summary>
|
||||
private static bool _tutorialPrompt = true;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
Locator.GetPromptManager().AddScreenPrompt(_attachPrompt, PromptPosition.UpperRight);
|
||||
Locator.GetPromptManager().AddScreenPrompt(_attachPrompt, _tutorialPrompt ? PromptPosition.Center : PromptPosition.UpperRight);
|
||||
Locator.GetPromptManager().AddScreenPrompt(_detachPrompt, PromptPosition.UpperRight);
|
||||
|
||||
_playerAttachPoint = gameObject.AddComponent<PlayerAttachPoint>();
|
||||
@ -34,8 +39,8 @@ public class ShipCustomAttach : MonoBehaviour
|
||||
{
|
||||
if (Locator.GetPromptManager())
|
||||
{
|
||||
Locator.GetPromptManager().RemoveScreenPrompt(_attachPrompt, PromptPosition.UpperRight);
|
||||
Locator.GetPromptManager().RemoveScreenPrompt(_detachPrompt, PromptPosition.UpperRight);
|
||||
Locator.GetPromptManager().RemoveScreenPrompt(_attachPrompt);
|
||||
Locator.GetPromptManager().RemoveScreenPrompt(_detachPrompt);
|
||||
}
|
||||
}
|
||||
|
||||
@ -83,6 +88,13 @@ public class ShipCustomAttach : MonoBehaviour
|
||||
transform.position = Locator.GetPlayerTransform().position;
|
||||
_playerAttachPoint.AttachPlayer();
|
||||
ShipManager.Instance.CockpitController._shipAudioController.PlayBuckle();
|
||||
|
||||
if (_tutorialPrompt)
|
||||
{
|
||||
_tutorialPrompt = false;
|
||||
Locator.GetPromptManager().RemoveScreenPrompt(_attachPrompt);
|
||||
Locator.GetPromptManager().AddScreenPrompt(_attachPrompt, PromptPosition.UpperRight);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user