-
Notifications
You must be signed in to change notification settings - Fork 17
BoltCallback
Namespace: TommoJProductions.ModApi.Attachable
Represents a callback for bolts.
public class BoltCallback : UnityEngine.MonoBehaviour
Inheritance Object → Object → Component → Behaviour → MonoBehaviour → BoltCallback
Represents the bolt that this callback is linked to.
public Bolt bolt { get; internal set; }
The bolt size for this callback.
public BoltSize boltSize { get; internal set; }
public bool highlighted { get; set; }
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; }
public bool useGUILayout { get; set; }
public bool enabled { get; set; }
public bool isActiveAndEnabled { get; }
public Transform transform { get; }
Transform
public GameObject gameObject { get; }
GameObject
public string tag { get; set; }
public string name { get; set; }
public HideFlags hideFlags { get; set; }
HideFlags
public BoltCallback()
awake
protected virtual void Awake()
The bolt on enter logic
protected internal virtual void onBoltEnter()
The bolt on exit logic
protected internal virtual void onBoltExit()
executes stock bolt check.
protected virtual bool doBoltCheck()
Boolean
returns true if player is holding correct tool for the bolt.
vaildates this bolt callback
protected virtual void vaildate()
Exception
throw an expection with a message describing the issues with the bolt callback.
public void highlight(bool highlight)
highlight
Boolean
Represents the on bolt exit event.
public event Action<BoltCallback> onMouseExit;
Represents the on bolt enter event.
public event Action<BoltCallback> onMouseEnter;