Lua stuffs
This commit is contained in:
Executable
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup useLegacyV2RuntimeActivationPolicy="true">
|
||||
<supportedRuntime version="v4.0"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
@@ -57,6 +57,9 @@ namespace DepthsBelow
|
||||
/// </summary>
|
||||
protected override void Initialize()
|
||||
{
|
||||
// TEST LUA
|
||||
new Lua();
|
||||
|
||||
// TODO: Add your initialization logic here
|
||||
Camera = new Camera(this);
|
||||
Squad = new List<Soldier>();
|
||||
|
||||
@@ -73,6 +73,13 @@
|
||||
<SignManifests>true</SignManifests>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="lua51">
|
||||
<HintPath>..\..\LuaInterface\lua51.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="LuaInterface, Version=2.0.0.16708, Culture=neutral, processorArchitecture=x86">
|
||||
<HintPath>..\..\LuaInterface\LuaInterface.dll</HintPath>
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
@@ -123,6 +130,7 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="Camera.cs" />
|
||||
<Compile Include="Interface.cs" />
|
||||
<Compile Include="Lua.cs" />
|
||||
<Compile Include="Shot.cs" />
|
||||
<Compile Include="Component\Shooting.cs" />
|
||||
<Compile Include="GUIManager.cs" />
|
||||
@@ -191,6 +199,7 @@
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="DepthsBelow_TemporaryKey.pfx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
|
||||
Executable
+27
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Reference in New Issue
Block a user