DarkKobold attacks!

Excellent move! 
The Metal Slime's Hit points have been reduced by 10.

Thou hast done well in defeating the Metal Slime
This commit is contained in:
kylethomson 2011-02-20 19:18:27 +00:00
parent 64f0681fcd
commit 0bcfa70dd4
4 changed files with 54 additions and 3 deletions

View File

@ -3,7 +3,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{DD448B37-BA3F-4544-9754-5406E8094723}</ProjectGuid>
<OutputType>Exe</OutputType>
@ -36,6 +36,10 @@
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="LuaInterface, Version=2.0.0.16708, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\LuaInterface.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=1.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Newtonsoft.Json.dll</HintPath>
@ -96,6 +100,7 @@
<Compile Include="Input\GamePad.cs" />
<Compile Include="Input\Input.cs" />
<Compile Include="Input\Keyboard.cs" />
<Compile Include="LuaImplementation.cs" />
<Compile Include="MainForm.cs">
<SubType>Form</SubType>
</Compile>

View File

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LuaInterface;
using System.Windows.Forms;
using BizHawk.MultiClient.tools;
namespace BizHawk.MultiClient
{
class LuaImplementation
{
Lua lua = new Lua();
LuaWindow Caller;
public LuaImplementation(LuaWindow passed)
{
Caller = passed.get();
lua.RegisterFunction("print",this, this.GetType().GetMethod("print"));
}
public void DoLuaFile(string File)
{
lua.DoFile(File);
}
public void print(string s)
{
Caller.AddText(s);
}
}
}

View File

@ -72,6 +72,7 @@
this.IDB_RUN.TabIndex = 4;
this.IDB_RUN.Text = "Run";
this.IDB_RUN.UseVisualStyleBackColor = true;
this.IDB_RUN.Click += new System.EventHandler(this.IDB_RUN_Click);
//
// IDB_STOP
//

View File

@ -6,16 +6,22 @@ using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using LuaInterface;
namespace BizHawk.MultiClient.tools
{
public partial class LuaWindow : Form
{
{
LuaImplementation LuaImp;
public LuaWindow()
{
InitializeComponent();
LuaImp = new LuaImplementation(this);
}
public LuaWindow get()
{
return this;
}
private void IDB_BROWSE_Click(object sender, EventArgs e)
{
OpenFileDialog fdlg = new OpenFileDialog();
@ -29,5 +35,15 @@ namespace BizHawk.MultiClient.tools
IDT_SCRIPTFILE.Text = fdlg.FileName;
}
}
public void AddText(string s)
{
IDT_OUTPUT.Text += s;
}
private void IDB_RUN_Click(object sender, EventArgs e)
{
LuaImp.DoLuaFile(IDT_SCRIPTFILE.Text);
}
}
}