Skip to main content

ItemLevitatorExtension

An abstract class in Root.Township, Alta.Progression.Skills.

Base component that adds a condition to the ItemLevitator on the same object: hovering is only allowed while IsValid returns true.

Constructors​

MemberWhat it is
protected ItemLevitatorExtension()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

MemberWhat it is
protected ItemLevitator levitatorThe ItemLevitator on the same object.

Methods​

MemberWhat it is
protected abstract bool IsValid()Subclasses return whether the item may hover now.
2 private and internal methods
MemberWhat it is
private void Awake()Finds the ItemLevitator and hooks its CheckHover event.
private void CheckHover(ref bool isValid)Handler for the levitator's check: clears the valid flag if IsValid is false.