Lua stuffs

This commit is contained in:
2012-10-16 20:55:13 +02:00
parent 9df0077257
commit a6391527ec
6 changed files with 45 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Input;
namespace DepthsBelow
{
class Lua
{
public Lua()
{
LuaInterface.Lua lua = new LuaInterface.Lua();
lua.RegisterFunction("GetKeyboardState", null, typeof(DepthsBelow.Lua).GetMethod("GetKeyboardState"));
object[] ret = lua.DoString("return GetKeyboardState()");
Console.WriteLine(((KeyboardState)ret[0]).ToString());
}
public KeyboardState GetKeyboardState()
{
return Keyboard.GetState();
}
}
}