public abstract class Hover
Inherits MonoBehaviour
, Messages.IOnUserDelete
Abstract class for GameObjects that need to be hoverable and deletable. All wires derive from this class.
Fields
public bool IsMouseInsideBounds
[SkipSerialisation]
Is true when the mouse is inside the implemented bounds.
public bool IsMouseOverlapping
[SkipSerialisation]
Is true when the mouse is inside the implemented bounds and collider.
Methods
protected abstract Bounds GetVisualBounds()
Should return the maximum world-space bounds.
protected virtual void CheckMouseInput()
Updates the mouse overlap variables. This has to be explicitly called by someone else.
public abstract void OnUserDelete()
Called when the player deletes this hoverable.
public virtual void OnMouseOverlapEvent(bool overlap)
Called when the mouse overlaps the collider.
protected abstract bool IsMouseInsideCollider()
Should return whether the mouse is inside the collider. If you don't need to use the collider
, you can override this implementation and use whatever you want.
protected virtual void OnDestroy()
No description provided
bi bij bibi