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>
|
/// </summary>
|
||||||
protected override void Initialize()
|
protected override void Initialize()
|
||||||
{
|
{
|
||||||
|
// TEST LUA
|
||||||
|
new Lua();
|
||||||
|
|
||||||
// TODO: Add your initialization logic here
|
// TODO: Add your initialization logic here
|
||||||
Camera = new Camera(this);
|
Camera = new Camera(this);
|
||||||
Squad = new List<Soldier>();
|
Squad = new List<Soldier>();
|
||||||
|
|||||||
@@ -73,6 +73,13 @@
|
|||||||
<SignManifests>true</SignManifests>
|
<SignManifests>true</SignManifests>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<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">
|
<Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -123,6 +130,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Camera.cs" />
|
<Compile Include="Camera.cs" />
|
||||||
<Compile Include="Interface.cs" />
|
<Compile Include="Interface.cs" />
|
||||||
|
<Compile Include="Lua.cs" />
|
||||||
<Compile Include="Shot.cs" />
|
<Compile Include="Shot.cs" />
|
||||||
<Compile Include="Component\Shooting.cs" />
|
<Compile Include="Component\Shooting.cs" />
|
||||||
<Compile Include="GUIManager.cs" />
|
<Compile Include="GUIManager.cs" />
|
||||||
@@ -191,6 +199,7 @@
|
|||||||
</BootstrapperPackage>
|
</BootstrapperPackage>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
<None Include="DepthsBelow_TemporaryKey.pfx" />
|
<None Include="DepthsBelow_TemporaryKey.pfx" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<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