Skip to main content

CraftingPieceChiselable

A class in Root.Township, Alta.Crafting.

A Chiselable on a generic crafting piece, so chisel hits damage the piece. Only chiselable while the piece can be removed.

Constructors​

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

Fields​

2 private and internal fields
MemberWhat it is
private bool isEnabledBacking flag for IsEnabled.
private GenericCraftingPiece pieceThe crafting piece this chiselable belongs to.

Properties​

MemberWhat it is
override bool IsEnabled { get; set; }True when enabled and the piece can be removed; setting it only changes the enabled flag.
override bool TriggerHaptics { get; }Haptics fire only while the piece can be removed.

Methods​

MemberWhat it is
override void ReceiveDamage(float damage, Vector3 position, Vector3 direction, ChiselingTool tool, Collider hitCollider)Applies the normal chisel damage and passes the damage to the piece as a chisel hit.