Skip to main content

TemperatureCheckInput

A class in Root.Township, the global namespace.

Skill input that turns on while a held item touches heat: it copies the item's colliders onto the HeatPoint layer and adds a HeatPointTriggerCollector, which calls SetActive.

Constructors​

MemberWhat it is
TemperatureCheckInput()Creates a TemperatureCheckInput with default values.

Fields​

3 private and internal fields
MemberWhat it is
private HeatPointTriggerCollector collectorTrigger collector added to the pickup that detects heat points.
private List<Collider> createdCollidersColliders this input created, destroyed by Clear.
private TemperatureCheckInputStructure structureInput settings for this skill.

Properties​

MemberWhat it is
HeldPickupHandler Handler { get; private set; }Held pickup handler this input belongs to.
bool IsActive { get; private set; }Whether the held item is currently counted as touching heat.
2 private and internal properties
MemberWhat it is
private bool ISkillInputMethod.NeedsUpdate { get; }Always false; this input doesn't need a per-frame update.
private bool ISkillInputMethod.ReceivesHits { get; }Always false; this input ignores tool hits.

Events​

MemberWhat it is
event Action<bool, ISkillInputMethod> ChangedActiveRaised with the new state when the input turns on or off.

Methods​

MemberWhat it is
void SetActive(bool isActive)Sets IsActive and raises ChangedActive.
7 private and internal methods
MemberWhat it is
private void ISkillInputMethod.Clear()Destroys the copied colliders and the trigger collector.
private void DuplicateCollider(Collider collider, int heatPointLayer)Copies a box, capsule or sphere collider onto a child object on the HeatPoint layer.
private T GetInstanced<T>(Collider collider)Makes a child object under the collider's transform and adds a new collider of the given type.
private bool ISkillInputMethod.ReceiveHit(HeldPickupHandler handler, ImpactHitWithTool hitWithTool, ProfessionSkill skill)Ignores hits and returns false.
private void ISkillInputMethod.RegisterHandler(HeldPickupHandler pickupHandler, SkillInputStructure structure, ProfessionSkill skill)Copies the held item's solid default-layer colliders (only tool colliders the structure accepts, if it's a tool) and adds the heat trigger collector.
private void ISkillInputMethod.Reset(bool isCallingEvent)Resets the collector's timer and turns the input off, raising ChangedActive if asked.
private void ISkillInputMethod.Update()Does nothing.

Used in​

Members of other types that take, return or hold a TemperatureCheckInput: