17.01.2021

+ WPF-Support
+ Game Controller System
+ GameKeybind System

+ SM_WPF_TEST
This commit is contained in:
Michel Fedde 2021-01-17 21:13:37 +01:00
parent af90d617d3
commit 6f23a80f7f
60 changed files with 1536 additions and 143 deletions

View file

@ -0,0 +1,32 @@
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);
}
}
}
}
}