Skip to content

API Summary

Wen Taichi edited this page Feb 1, 2025 · 3 revisions

Run Abilities

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();

Chain Event Contexts

Work In Progress

Customize Event Contexts

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;
}

Pause and Resume

Use IResumeContext to resume from the paused state, and the pause node should respond to the choice.

Work In Progress

Clone this wiki locally