spyplane works

This commit is contained in:
Chris Forbes
2010-01-24 14:53:18 +13:00
parent 74af815f24
commit da40ab449e
7 changed files with 70 additions and 10 deletions

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace OpenRa.Traits.Activities
{
class RemoveSelf : IActivity
{
bool isCanceled;
public IActivity NextActivity { get; set; }
public IActivity Tick(Actor self)
{
if (isCanceled) return NextActivity;
self.World.AddFrameEndTask(w => w.Remove(self));
return null;
}
public void Cancel(Actor self) { isCanceled = true; NextActivity = null; }
}
}