smrendererv3/SMOptionals/SM.Game/Controls/GameKeybind.cs
Michel Fedde 6f23a80f7f 17.01.2021
+ WPF-Support
+ Game Controller System
+ GameKeybind System

+ SM_WPF_TEST
2021-01-17 21:13:37 +01:00

32 lines
No EOL
953 B
C#

using System;
using OpenTK.Input;
namespace SM.Game.Controls
{
public class GameKeybind
{
public Func<GameKeybindContext, object> Keyboard;
public Func<GameKeybindContext, object> Controller;
public Func<GameKeybindContext, object> AI;
public Func<GameKeybindContext, object> this[GameKeybindActorType type]
{
get
{
switch (type)
{
case GameKeybindActorType.AI:
return AI;
case GameKeybindActorType.Keyboard:
return Keyboard;
break;
case GameKeybindActorType.Controller:
return Controller;
break;
default:
throw new ArgumentOutOfRangeException(nameof(type), type, null);
}
}
}
}
}