increase room diversity, improve ui
This commit is contained in:
21
Assets/Engine/Runtime/UI/PersistedUI.cs
Normal file
21
Assets/Engine/Runtime/UI/PersistedUI.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace EscapeRoomEngine.Engine.Runtime.UI
|
||||
{
|
||||
public abstract class PersistedUI<T> : MonoBehaviour
|
||||
{
|
||||
public string key;
|
||||
public T defaultValue;
|
||||
|
||||
public T Value { get; protected set; }
|
||||
|
||||
protected virtual void Start()
|
||||
{
|
||||
Value = RetrieveValue();
|
||||
DisplayValue();
|
||||
}
|
||||
|
||||
protected abstract T RetrieveValue();
|
||||
protected abstract void DisplayValue();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user