Add airship level
Fix default spawn issue TODO: Fix issue with spawning when loading from other scenes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user