54 lines
1.4 KiB
C#
54 lines
1.4 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using NaughtyAttributes;
|
|
using NaughtyAttributes.Test;
|
|
using UnityEngine;
|
|
using UnityEngine.Serialization;
|
|
|
|
[CreateAssetMenu(fileName = "BootstrapConfig.asset", menuName = "KernelPanic/Boot/Config")]
|
|
public class BootstrapConfig : ScriptableObject
|
|
{
|
|
[Header("Scenes")]
|
|
[SerializeField] [Scene]
|
|
private string BootflowScene;
|
|
|
|
[SerializeField] [Scene]
|
|
private string MainMenuScene;
|
|
|
|
[SerializeField] [Scene]
|
|
private string CreditsScene;
|
|
|
|
[SerializeField] [Scene]
|
|
private string GameplayScene;
|
|
|
|
public LevelDescriptor StartLevel => _startLevel;
|
|
[SerializeField]
|
|
private LevelDescriptor _startLevel;
|
|
|
|
public float TransitionDuration => _transitionDuration;
|
|
[Header( "Transition" )]
|
|
[SerializeField] [FormerlySerializedAs("TransitionDuration")]
|
|
private float _transitionDuration;
|
|
|
|
public string GetScene( SceneType sceneType )
|
|
{
|
|
switch ( sceneType )
|
|
{
|
|
case SceneType.BootSequence:
|
|
return BootflowScene;
|
|
|
|
case SceneType.MainMenu:
|
|
return MainMenuScene;
|
|
|
|
case SceneType.Gameplay:
|
|
return GameplayScene;
|
|
|
|
case SceneType.Credits:
|
|
return CreditsScene;
|
|
|
|
default:
|
|
return null;
|
|
}
|
|
}
|
|
}
|