Class DreamnailableObject
A basic component that gives the player soul when dreamnailed
Inheritance
Object
Component
Behaviour
MonoBehaviour
DreamnailableObject
Implements
Namespace: WeaverCore.Dreamnail
Assembly: WeaverCore.dll
Syntax
public class DreamnailableObject : MonoBehaviour, IDreamnailable
Fields
| Edit this page View SourcecooldownDuration
Declaration
[SerializeField]
[Tooltip("The cooldown before this object can be dreamnailed again. Set to 0 for no cooldown")]
protected float cooldownDuration
Field Value
| Type | Description |
|---|---|
| float |
flashWhenHit
Declaration
[SerializeField]
[Tooltip("Should the object flash when dreamnailed?")]
protected bool flashWhenHit
Field Value
| Type | Description |
|---|---|
| bool |
recoilWhenHit
Declaration
[SerializeField]
[Tooltip("Should the object be recoiled when dreamnailed?")]
protected bool recoilWhenHit
Field Value
| Type | Description |
|---|---|
| bool |
soulAmount
Declaration
[SerializeField]
[Tooltip("Specifies how much soul the player gains upon dreamnailing")]
protected int soulAmount
Field Value
| Type | Description |
|---|---|
| int |
Properties
| Edit this page View SourceCanBeDreamnailed
Can the object be dreamnailed?
Declaration
public bool CanBeDreamnailed { get; }
Property Value
| Type | Description |
|---|---|
| bool |
LastDreamnailHitTime
The time the object was hit last (or 0 if the object was never hit).
Declaration
public float LastDreamnailHitTime { get; protected set; }
Property Value
| Type | Description |
|---|---|
| float |
Methods
| Edit this page View SourceDreamnailHit(Player)
Called when the player dreamnails this object. Returns how much soul to heal the player, or zero to not give any soul
Declaration
public int DreamnailHit(Player player)
Parameters
| Type | Name | Description |
|---|---|---|
| Player | player | the player that dreamnailed this object |
Returns
| Type | Description |
|---|---|
| int | Returns how much soul to heal the player, or zero to not give any soul |
OnDreamnailHit(Player)
Declaration
protected virtual int OnDreamnailHit(Player player)
Parameters
| Type | Name | Description |
|---|---|---|
| Player | player |
Returns
| Type | Description |
|---|---|
| int |
Reset()
Declaration
protected virtual void Reset()