changes from code review

This commit is contained in:
cyndrdev 2021-02-12 14:04:12 +00:00
parent d62f3a7b6b
commit 7c769a2371
5 changed files with 12 additions and 33 deletions

View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using NaughtyAttributes; using NaughtyAttributes;
using NaughtyAttributes.Test; using NaughtyAttributes.Test;
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
[CreateAssetMenu(fileName = "BootstrapConfig.asset", menuName = "KernelPanic/Boot/Config")] [CreateAssetMenu(fileName = "BootstrapConfig.asset", menuName = "KernelPanic/Boot/Config")]
public class BootstrapConfig : ScriptableObject public class BootstrapConfig : ScriptableObject
@ -20,11 +21,14 @@ public class BootstrapConfig : ScriptableObject
[SerializeField] [Scene] [SerializeField] [Scene]
private string GameplayScene; private string GameplayScene;
public LevelDescriptor StartLevel => _startLevel;
[SerializeField] [SerializeField]
public LevelDescriptor StartLevel; private LevelDescriptor _startLevel;
public float TransitionDuration => _transitionDuration;
[Header( "Transition" )] [Header( "Transition" )]
public float TransitionDuration; [SerializeField] [FormerlySerializedAs("TransitionDuration")]
private float _transitionDuration;
public string GetScene( SceneType sceneType ) public string GetScene( SceneType sceneType )
{ {

View File

@ -1,16 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Cutscene : MonoBehaviour
{
public enum Stage
{
Loading,
InProgress,
Complete,
}
private Stage _stage;
public Stage LoadStage => _stage;
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 4eb06267885558c42939f85fd909ebc0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -2,10 +2,12 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using NaughtyAttributes; using NaughtyAttributes;
using UnityEngine.Serialization;
[CreateAssetMenu(fileName = "LevelDescriptor.asset", menuName = "KernelPanic/Boot/LevelDescriptor")] [CreateAssetMenu(fileName = "LevelDescriptor.asset", menuName = "KernelPanic/Boot/LevelDescriptor")]
public class LevelDescriptor : ScriptableObject public class LevelDescriptor : ScriptableObject
{ {
[SerializeField] [Scene] public string LevelScene => _levelScene;
public string LevelScene; [FormerlySerializedAs("LevelScene")][SerializeField][Scene]
private string _levelScene;
} }

View File

@ -16,5 +16,5 @@ MonoBehaviour:
MainMenuScene: MainMenu MainMenuScene: MainMenu
CreditsScene: Credits CreditsScene: Credits
GameplayScene: Main GameplayScene: Main
StartLevel: {fileID: 11400000, guid: 914bdd40f2fe0d1488c4999c4320b423, type: 2} _startLevel: {fileID: 11400000, guid: 914bdd40f2fe0d1488c4999c4320b423, type: 2}
TransitionDuration: 1 _transitionDuration: 1