OnCapture lua trigger & nod03a

Cleaned up nod03a, spaces -> tabs

nod03a and OnCapture lua trigger
This commit is contained in:
Dan9550
2014-01-03 23:36:42 +11:00
parent 197c583ea6
commit 91050ba458
5 changed files with 729 additions and 2 deletions

View File

@@ -15,11 +15,12 @@ namespace OpenRA.Mods.RA.Scripting
{
public class LuaScriptEventsInfo : TraitInfo<LuaScriptEvents> { }
public class LuaScriptEvents : INotifyKilled, INotifyAddedToWorld, INotifyRemovedFromWorld
public class LuaScriptEvents : INotifyKilled, INotifyAddedToWorld, INotifyRemovedFromWorld, INotifyCapture
{
public event Action<Actor, AttackInfo> OnKilled = (self, e) => { };
public event Action<Actor> OnAddedToWorld = self => { };
public event Action<Actor> OnRemovedFromWorld = self => { };
public event Action<Actor, Actor, Player, Player> OnCaptured = (self, captor, oldOwner, newOwner) => { };
public void Killed(Actor self, AttackInfo e)
{
@@ -35,5 +36,10 @@ namespace OpenRA.Mods.RA.Scripting
{
OnRemovedFromWorld(self);
}
public void OnCapture(Actor self, Actor captor, Player oldOwner, Player newOwner)
{
OnCaptured(self, captor, oldOwner, newOwner);
}
}
}