mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
42 lines
1.7 KiB
C#
42 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using UnityEngine;
|
|
|
|
namespace RimWorldAnimationStudio
|
|
{
|
|
public class InputManager : Singleton<InputManager>
|
|
{
|
|
public void Update()
|
|
{
|
|
if (Input.GetKey(KeyCode.LeftControl) && Input.GetKeyDown(KeyCode.Z))
|
|
{ Workspace.Instance.Undo(); }
|
|
|
|
else if (Input.GetKey(KeyCode.LeftCommand) && Input.GetKeyDown(KeyCode.Z))
|
|
{ Workspace.Instance.Undo(); }
|
|
|
|
else if (Input.GetKey(KeyCode.LeftControl) && Input.GetKeyDown(KeyCode.Y))
|
|
{ Workspace.Instance.Redo(); }
|
|
|
|
else if (Input.GetKey(KeyCode.LeftCommand) && Input.GetKey(KeyCode.LeftShift) && Input.GetKeyDown(KeyCode.Z))
|
|
{ Workspace.Instance.Redo(); }
|
|
|
|
else if ((Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.LeftCommand)) && Input.GetKeyDown(KeyCode.C))
|
|
{ AnimationController.Instance.ClonePawnKeyframe(); }
|
|
|
|
else if (Input.GetKey(KeyCode.Backspace) || Input.GetKey(KeyCode.Delete))
|
|
{ AnimationController.Instance.RemovePawnKeyframe(); }
|
|
|
|
else if ((Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.LeftCommand)) && Input.GetKeyDown(KeyCode.N))
|
|
{ ApplicationManager.Instance.TryToMakeNewAnimation(); }
|
|
|
|
else if ((Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.LeftCommand)) && Input.GetKeyDown(KeyCode.S))
|
|
{ ApplicationManager.Instance.TryToSaveAnimation(); }
|
|
|
|
else if ((Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.LeftCommand)) && Input.GetKeyDown(KeyCode.L))
|
|
{ ApplicationManager.Instance.TryToLoadAnimation(); }
|
|
}
|
|
}
|
|
}
|