Class InteractableBase
Very simple implementation of an interactable object. Inheriting classes should override provided methods.
Inheritance
System.Object
InteractableBase
Implements
Namespace: Edgar.Unity.Examples
Assembly: cs.temp.dll.dll
Syntax
public abstract class InteractableBase : MonoBehaviour, IInteractable
Fields
InteractionText
Declaration
protected Text InteractionText
Field Value
Type | Description |
---|---|
Text |
Methods
BeginInteract()
Override if needed. Base implementation does nothing.
Declaration
public virtual void BeginInteract()
EndInteract()
Override if needed. Base implementation does nothing.
Declaration
public virtual void EndInteract()
HideText()
Hides the interaction text if the corresponding UI object exits.
Declaration
protected void HideText()
Interact()
Override if needed. Base implementation does nothing.
Declaration
public virtual void Interact()
IsInteractionAllowed()
Override if needed. Base implementation returns always true if game object is active.
Declaration
public virtual bool IsInteractionAllowed()
Returns
Type | Description |
---|---|
System.Boolean |
OnDisable()
Declaration
public void OnDisable()
ShowText(String)
Shows a text on the screen if the corresponding UI object exits.
Declaration
protected void ShowText(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text |
Start()
Declaration
public void Start()