Skip to main content

HashSetAction<T>

An abstract class in Root.Township, the global namespace.

Base for game task actions whose filters are sets built on first use. An empty set matches anything.

Constructors​

MemberWhat it is
protected HashSetAction()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

1 private and internal field
MemberWhat it is
private bool isInitializedSet once Initialize has run, on the first IsValid call.

Methods​

MemberWhat it is
override bool IsValid(GameTaskActionArgument argument)Runs Initialize the first time, then the normal argument check.
protected abstract void Initialize()Builds the subclass's sets. Called once, the first time IsValid runs.
protected bool IsSkippingOut<TSet>(TSet value, HashSet<TSet> set)True when the set has entries and the value isn't one of them.