add self param to OnCancel

This commit is contained in:
Bob
2010-10-23 20:08:25 +13:00
committed by Chris Forbes
parent 9a54074b1b
commit c4ee5fbd41
6 changed files with 7 additions and 7 deletions

View File

@@ -186,11 +186,11 @@ namespace OpenRA.Traits
protected bool IsCanceled { get; private set; }
public abstract IActivity Tick( Actor self );
protected virtual bool OnCancel() { return true; }
protected virtual bool OnCancel( Actor self ) { return true; }
public void Cancel( Actor self )
{
IsCanceled = OnCancel();
IsCanceled = OnCancel( self );
if( IsCanceled )
NextActivity = null;
else if (NextActivity != null)