mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Bug fixes plus extra features
- Insert adds a new keyframe to the selected timeline - New stages have frames cloned from the last frame of current stage - Existing key are now replaced when another key is dropped on them - Fixed bug where starting a new animation could result in errors
This commit is contained in:
parent
ca22fa0c18
commit
2989d9a72c
137 changed files with 527 additions and 668 deletions
|
@ -8,26 +8,30 @@ using UnityEngine;
|
|||
|
||||
namespace RimWorldAnimationStudio
|
||||
{
|
||||
public class KeybindConfig : Singleton<KeybindConfig>
|
||||
public class KeybindConfig
|
||||
{
|
||||
private static List<Keybind> keybinds = new List<Keybind>();
|
||||
private static bool initialized = false;
|
||||
|
||||
public void Awake()
|
||||
public static void Initialize()
|
||||
{
|
||||
string path = Path.Combine(Application.streamingAssetsPath, "keybindConfig.xml");
|
||||
|
||||
keybinds = XmlUtility.ReadXML<List<Keybind>>(path);
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
public List<Keybind> GetAllKeybinds()
|
||||
public static List<Keybind> GetAllKeybinds()
|
||||
{
|
||||
if (initialized == false)
|
||||
{ Initialize(); }
|
||||
|
||||
return keybinds;
|
||||
}
|
||||
|
||||
public string GetKeybindLabel(string command)
|
||||
public static string GetKeybindLabel(string command)
|
||||
{
|
||||
string label = "";
|
||||
Keybind keybind = keybinds.FirstOrDefault(x => x.command == command);
|
||||
Keybind keybind = GetAllKeybinds()?.FirstOrDefault(x => x.command == command);
|
||||
|
||||
if (keybind == null) return label;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue