Skip to content

BoltCallback

Tommo J. Phillips edited this page Oct 22, 2023 · 3 revisions

BoltCallback

Namespace: TommoJProductions.ModApi.Attachable

Represents a callback for bolts.

public class BoltCallback : UnityEngine.MonoBehaviour

Inheritance Object → Object → Component → Behaviour → MonoBehaviour → BoltCallback

Properties

bolt

Represents the bolt that this callback is linked to.

public Bolt bolt { get; internal set; }

Property Value

Bolt

boltSize

The bolt size for this callback.

public BoltSize boltSize { get; internal set; }

Property Value

BoltSize

highlighted

public bool highlighted { get; set; }

Property Value

Boolean

boltCheck

Represents the bolt check. checks if in the correct mode based on BoltCallback.boltSize (if BoltSize.hand player would need to be in HandMode otherwise tool mode would be required) and that the player is holding the correct tool for the fastener.

public virtual bool boltCheck { get; }

Property Value

Boolean

useGUILayout

public bool useGUILayout { get; set; }

Property Value

Boolean

enabled

public bool enabled { get; set; }

Property Value

Boolean

isActiveAndEnabled

public bool isActiveAndEnabled { get; }

Property Value

Boolean

transform

public Transform transform { get; }

Property Value

Transform

gameObject

public GameObject gameObject { get; }

Property Value

GameObject

tag

public string tag { get; set; }

Property Value

String

name

public string name { get; set; }

Property Value

String

hideFlags

public HideFlags hideFlags { get; set; }

Property Value

HideFlags

Constructors

BoltCallback()

public BoltCallback()

Methods

Awake()

awake

protected virtual void Awake()

onBoltEnter()

The bolt on enter logic

protected internal virtual void onBoltEnter()

onBoltExit()

The bolt on exit logic

protected internal virtual void onBoltExit()

doBoltCheck()

executes stock bolt check.

protected virtual bool doBoltCheck()

Returns

Boolean
returns true if player is holding correct tool for the bolt.

vaildate()

vaildates this bolt callback

protected virtual void vaildate()

Exceptions

Exception
throw an expection with a message describing the issues with the bolt callback.

highlight(Boolean)

public void highlight(bool highlight)

Parameters

highlight Boolean

Events

onMouseExit

Represents the on bolt exit event.

public event Action<BoltCallback> onMouseExit;

onMouseEnter

Represents the on bolt enter event.

public event Action<BoltCallback> onMouseEnter;
Clone this wiki locally