DeltaVR/Assets/Scripts/InputHandler.cs

31 lines
829 B
C#

//InputHandler.cs
using UnityEngine;
using System.Collections.Generic;
using System.Linq;
public class InputHandler : MonoBehaviour
{
// SerializeField let's us assign a value in the Unity editor for private variables.
[SerializeField]
// The character currently being commanded
private GridMovement currentActor;
// A list of all characters in the scene
private List<GridMovement> allActors;
// Variables for binding commands to input and executing commands
public List<Command> Keymap = new List<Command>(); // keycode to command mapping
// Use this for initialization
void Awake()
{
// TODO: Add movement commands to the list
}
void Update()
{
// TODO: Loop through all commands and execute them on correct actor via correct key press.
}
}