Implement player spawning in predefined location in lobby and levels
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using HurricaneVR.Framework.Core.Player;
|
||||
using Sirenix.OdinInspector;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@@ -24,6 +25,16 @@ public class LevelManager : MonoBehaviour
|
||||
[ReadOnly]
|
||||
private MusicManager musicManager;
|
||||
|
||||
[Inject]
|
||||
[SerializeField]
|
||||
[ReadOnly]
|
||||
private PlayerSpawner playerSpawner;
|
||||
|
||||
[Inject]
|
||||
[SerializeField]
|
||||
[ReadOnly]
|
||||
private HVRPlayerController playerController;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
health = level.health;
|
||||
@@ -32,6 +43,8 @@ public class LevelManager : MonoBehaviour
|
||||
{
|
||||
musicManager.Play(level.pauseClip);
|
||||
}
|
||||
|
||||
playerSpawner.Spawn(playerController.gameObject);
|
||||
}
|
||||
|
||||
public void OnEnemyReachedFinish(EnemyComponent enemy)
|
||||
|
||||
Reference in New Issue
Block a user