Class VomitGlob
WeaverCore's implementation of a Nosk Vomit Glob
Inheritance
Object
Component
Behaviour
MonoBehaviour
VomitGlob
Assembly: WeaverCore.dll
Syntax
public class VomitGlob : MonoBehaviour, IOnPool
Fields
|
Edit this page
View Source
onDisappear
Declaration
[SerializeField]
public UnityEvent onDisappear
Field Value
Type |
Description |
UnityEvent |
|
|
Edit this page
View Source
onLand
Declaration
[SerializeField]
public UnityEvent onLand
Field Value
Type |
Description |
UnityEvent |
|
Properties
|
Edit this page
View Source
Animator
Declaration
public WeaverAnimationPlayer Animator { get; }
Property Value
|
Edit this page
View Source
Grounded
Declaration
public bool Grounded { get; }
Property Value
|
Edit this page
View Source
HasLifeTime
Declaration
public bool HasLifeTime { get; set; }
Property Value
|
Edit this page
View Source
MainCollider
Declaration
public Collider2D MainCollider { get; }
Property Value
Type |
Description |
Collider2D |
|
|
Edit this page
View Source
MainRenderer
Declaration
public SpriteRenderer MainRenderer { get; }
Property Value
Type |
Description |
SpriteRenderer |
|
|
Edit this page
View Source
PlaySounds
Declaration
public bool PlaySounds { get; set; }
Property Value
|
Edit this page
View Source
RB
Declaration
public Rigidbody2D RB { get; }
Property Value
Type |
Description |
Rigidbody2D |
|
|
Edit this page
View Source
lifeTimeRange
Declaration
public Vector2 lifeTimeRange { get; set; }
Property Value
Methods
|
Edit this page
View Source
ForceDisappear()
Declaration
public void ForceDisappear()
|
Edit this page
View Source
ForceDisappear(float)
Declaration
public void ForceDisappear(float time)
Parameters
Type |
Name |
Description |
float |
time |
|
|
Edit this page
View Source
OnPool()
Called when the object is sent back to a pool
Declaration
|
Edit this page
View Source
SetScale(float)
Declaration
public void SetScale(float scale)
Parameters
Type |
Name |
Description |
float |
scale |
|
|
Edit this page
View Source
SetScaleGradually(float, AnimationCurve, float)
Declaration
public void SetScaleGradually(float newScale, AnimationCurve curve, float time = 0.5)
Parameters
Type |
Name |
Description |
float |
newScale |
|
AnimationCurve |
curve |
|
float |
time |
|
|
Edit this page
View Source
Spawn(Vector3, Vector2, float, bool)
Spawns a VomitGlob at the specified position with the given velocity, gravity scale, and sound settings.
Declaration
public static VomitGlob Spawn(Vector3 position, Vector2 velocity, float gravityScale = 0.7, bool playSounds = true)
Parameters
Type |
Name |
Description |
Vector3 |
position |
The position where the VomitGlob should be spawned.
|
Vector2 |
velocity |
The initial velocity of the VomitGlob.
|
float |
gravityScale |
The gravity scale applied to the VomitGlob (default is 0.7f).
|
bool |
playSounds |
Flag indicating whether to play sounds for the spawned VomitGlob (default is true).
|
Returns
|
Edit this page
View Source
Spawn(VomitGlob, Vector3, Vector2, float, bool)
Spawns a VomitGlob using the specified prefab at the given position with the provided velocity, gravity scale, and sound settings.
Declaration
public static VomitGlob Spawn(VomitGlob prefab, Vector3 position, Vector2 velocity, float gravityScale = 0.7, bool playSounds = true)
Parameters
Type |
Name |
Description |
VomitGlob |
prefab |
The VomitGlob prefab to be used for spawning.
|
Vector3 |
position |
The position where the VomitGlob should be spawned.
|
Vector2 |
velocity |
The initial velocity of the VomitGlob.
|
float |
gravityScale |
The gravity scale applied to the VomitGlob (default is 0.7f).
|
bool |
playSounds |
Flag indicating whether to play sounds for the spawned VomitGlob (default is true).
|
Returns
Implements
Extension Methods