-
Notifications
You must be signed in to change notification settings - Fork 35
API Summary
Wen Taichi edited this page Feb 1, 2025
·
3 revisions
Run your abilities with the following API:
bool FlexiCore.TryEnqueueAbility(AbilityContainer, IEventContext)bool FlexiCore.TryEnqueueAbility(List<AbilityContainer>, IEventContext)void FlexiCore.Run()
Example
_ = _flexiCore.TryEnqueueAbility(unit, eventContext);
_flexiCore.Run();Work In Progress
Contexts are for telling your system "what happened?". Then your system can know "what to do?" They are data classes and it's you to decide their contents.
Use IEventContext and TryEnqueueAbility to start or chain an ability flow.
Example
public class DamageEvent : IEventContext
{
public Unit attacker;
public List<Unit> targets;
public int amount;
}Use IResumeContext to resume from the paused state, and the pause node should respond to the choice.
Work In Progress