feat: add initial People Playground mod development kit
This commit is contained in:
34
extracted_wiki_content/internalReference/hover.txt
Normal file
34
extracted_wiki_content/internalReference/hover.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
URL: https://wiki.studiominus.nl/internalReference/Hover.html
|
||||
Title: People Playground Modding - Hover
|
||||
==================================================
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user