Add airship level

Fix default spawn issue
TODO: Fix issue with spawning when loading from other scenes
This commit is contained in:
2022-08-30 01:48:01 -07:00
parent 82bf43452b
commit 7a891a45f1
22 changed files with 3856 additions and 316 deletions

View File

@@ -11,8 +11,6 @@ namespace Scampz.GameJam
[SerializeField]
private string _scene;
[SerializeField]
private Transform _spawnPoint;
[SerializeField]
private bool _promptToEnter;
[SerializeField]
private TextMeshProUGUI _promptText;
@@ -31,7 +29,7 @@ namespace Scampz.GameJam
private void OnTriggerStay(Collider collider)
{
if (!_loaded && collider.CompareTag("Player") && _promptText != null && _promptText.enabled && Input.GetButtonDown(InputOptions.Submit))
if (!_loaded && collider.CompareTag("Player") && _promptText != null && _promptText.enabled && Input.GetButton(InputOptions.Submit))
LoadNextLevel();
}
@@ -44,7 +42,7 @@ namespace Scampz.GameJam
private void LoadNextLevel()
{
_loaded = true;
GameManager.Instance.LoadScene(_scene, _spawnPoint, LoadSceneMode.Single);
GameManager.Instance.LoadScene(_scene, LoadSceneMode.Single);
}
}
}