Make Tick return bool

This commit is contained in:
tovl
2019-05-14 21:13:25 +02:00
committed by teinarss
parent 09c1611239
commit 3790169db9
49 changed files with 328 additions and 318 deletions

View File

@@ -25,12 +25,12 @@ namespace OpenRA.Mods.Common.Activities
IsInterruptible = interruptible;
}
public override Activity Tick(Actor self)
public override bool Tick(Actor self)
{
if (IsCanceling)
return NextActivity;
return true;
return (remainingTicks-- == 0) ? NextActivity : this;
return remainingTicks-- == 0;
}
}
@@ -45,12 +45,12 @@ namespace OpenRA.Mods.Common.Activities
IsInterruptible = interruptible;
}
public override Activity Tick(Actor self)
public override bool Tick(Actor self)
{
if (IsCanceling)
return NextActivity;
return true;
return (f == null || f()) ? NextActivity : this;
return f == null || f();
}
}
}