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

@@ -9,6 +9,7 @@ namespace Scampz.GameJam.Assets.Scripts.Player
private bool _canMove;
private GameObject _player;
private CharacterController _characterController;
public string SceneName;
private void Start()
{
@@ -24,6 +25,9 @@ namespace Scampz.GameJam.Assets.Scripts.Player
var rayCasterExists = TryGetComponent<RayCaster>(out var rayCaster);
if (SceneManager.GetActiveScene().name.Equals("WorldMap") && rayCasterExists)
_canMove = rayCaster.IsWithinBoundsWithRay();
if (SceneName != string.Empty && SceneName != "WorldMap")
SceneName = SceneManager.GetActiveScene().name;
}
public bool CanMove => _canMove;