33 lines
886 B
C#
33 lines
886 B
C#
using UnityEngine;
|
|
|
|
public class GameplayBootstrap : MonoBehaviour
|
|
{
|
|
[SerializeField] private Transform CameraPosition;
|
|
[SerializeField] private EnemySpawner Spawner;
|
|
[SerializeField] private Transform PlayerTransform;
|
|
|
|
[Header("UI")]
|
|
[SerializeField] private Canvas ScreenCanvas;
|
|
[SerializeField] private Canvas VrCanvas;
|
|
private void Awake()
|
|
{
|
|
if (!BootstrapperState.MainBootstraped)
|
|
{
|
|
SceneLoader.LoadScene("Bootstrap");
|
|
return;
|
|
}
|
|
|
|
GameplayManager.PlayerTransform = PlayerTransform;
|
|
|
|
ScreenCanvas.worldCamera = CamerasManager.Screen_Camera;
|
|
VrCanvas.worldCamera = CamerasManager.VR_Camera;
|
|
|
|
CamerasManager.CamerasPivot.position = CameraPosition.position;
|
|
CamerasManager.CamerasPivot.rotation = CameraPosition.rotation;
|
|
|
|
Spawner.Initialize();
|
|
|
|
|
|
}
|
|
}
|