This repository has been archived on 2023-02-02. You can view files and clone it, but cannot push or open issues or pull requests.
mfgames-nitride-cil/src/MfGames.Nitride.Temporal.Schedules/ISchedule.cs
D. Moonfire d5b975c179
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
feat(schedules): implemented the basic schedule
2023-01-16 22:10:24 -06:00

31 lines
970 B
C#

using MfGames.Gallium;
namespace MfGames.Nitride.Temporal.Schedules;
/// <summary>
/// A schedule is a specific schedule that can be applied to an entity to make
/// changes based on components.
/// </summary>
public interface ISchedule
{
/// <summary>
/// Applies the schedule changes to the entity and returns the results.
/// </summary>
/// <param name="entity">The entity to update.</param>
/// <param name="timekeeper">The timekeeper for apply.</param>
/// <returns>
/// The modified entity, if the changes can be applied, otherwise the same
/// entity.
/// </returns>
Entity Apply(
Entity entity,
Timekeeper timekeeper);
/// <summary>
/// Determines if a schedule applies to a given entity.
/// </summary>
/// <param name="entity">The entity to test.</param>
/// <returns>True if the schedule applies to the given entity, otherwise false.</returns>
bool CanApply(Entity entity);
}