Route local menu visibility through observed dock state
This commit is contained in:
parent
f02a73269f
commit
80c8ddd87c
4 changed files with 58 additions and 6 deletions
|
|
@ -22,12 +22,13 @@ public class LocalMenu : MonoBehaviour
|
|||
|
||||
private void OnEnable()
|
||||
{
|
||||
if (ActionGameManager.Instance.DockedEntity is OrbitalEntity orbital)
|
||||
if (ActionGameManager.Instance == null ||
|
||||
!ActionGameManager.Instance.TryGetObservedDockedLocalStory(out _currentLocation))
|
||||
{
|
||||
_currentLocation = orbital.Story;
|
||||
_activeStory = _currentLocation.Story;
|
||||
return;
|
||||
}
|
||||
else return;
|
||||
|
||||
_activeStory = _currentLocation.Story;
|
||||
Continue();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue