// Copyright (c) 2024 Augie R. Maddox, Guavaman Enterprises. All rights reserved.
#pragma warning disable 0649
namespace Rewired.Glyphs {
using System;
///
/// A list of controller element glyphs.
///
[Serializable]
public abstract class GlyphSet : UnityEngine.ScriptableObject {
[UnityEngine.Tooltip(
"A list of base keys. Final keys will be composed of base key + glyph key. " +
"Setting multiple base keys allows one glyph set to apply to multiple controllers, for example."
)]
[UnityEngine.SerializeField]
private string[] _baseKeys;
///
/// A list of base keys.
/// Final keys will be composed of base key + glyph key.
/// Setting multiple base keys allows one glyph set to apply to multiple controllers, for example.
///
public string[] baseKeys {
get {
return _baseKeys;
}
set {
_baseKeys = value;
}
}
///
/// The number of glyphs.
///
public abstract int glyphCount { get; }
///
/// Gets the glyph entry at the specified index.
///
/// The index.
/// The glyph entry at the specified index.
public abstract EntryBase GetEntry(int index);
[Serializable]
public abstract class EntryBase {
[UnityEngine.SerializeField]
private string _key;
public string key {
get {
return _key;
}
set {
_key = value;
}
}
public abstract object GetValue();
}
[Serializable]
public abstract class EntryBase : EntryBase {
[UnityEngine.SerializeField]
private TValue _value;
public TValue value {
get {
return _value;
}
set {
_value = value;
}
}
public override object GetValue() {
return _value;
}
}
}
}