Add default for Activity-Tick
This commit is contained in:
@@ -82,7 +82,13 @@ namespace OpenRA.Activities
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract Activity Tick(Actor self);
|
/// <summary>
|
||||||
|
/// Runs every timestep as long as this activity is active.
|
||||||
|
/// </summary>
|
||||||
|
public virtual Activity Tick(Actor self)
|
||||||
|
{
|
||||||
|
return NextActivity;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Runs once immediately before the first Tick() execution.
|
/// Runs once immediately before the first Tick() execution.
|
||||||
|
|||||||
@@ -50,12 +50,6 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
QueueChild(new TakeOff(self));
|
QueueChild(new TakeOff(self));
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Activity Tick(Actor self)
|
|
||||||
{
|
|
||||||
|
|
||||||
return NextActivity;
|
|
||||||
}
|
|
||||||
|
|
||||||
class ReleaseUnit : Activity
|
class ReleaseUnit : Activity
|
||||||
{
|
{
|
||||||
readonly Carryall carryall;
|
readonly Carryall carryall;
|
||||||
@@ -98,11 +92,6 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
carryable.Detached(cargo);
|
carryable.Detached(cargo);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Activity Tick(Actor self)
|
|
||||||
{
|
|
||||||
return NextActivity;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,11 +168,5 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
{
|
{
|
||||||
return new Order(orderString, newActor, target, true);
|
return new Order(orderString, newActor, target, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Activity Tick(Actor self)
|
|
||||||
{
|
|
||||||
// Activity is a placeholder that should never run
|
|
||||||
return NextActivity;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user