Show / Hide Table of Contents

Class VomitGlob

WeaverCore's implementation of a Nosk Vomit Glob

Inheritance
object
Object
Component
Behaviour
MonoBehaviour
VomitGlob
Implements
IOnPool
Namespace: WeaverCore.Assets.Components
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
Type Description
WeaverAnimationPlayer
| Edit this page View Source

Grounded

Declaration
public bool Grounded { get; }
Property Value
Type Description
bool
| Edit this page View Source

HasLifeTime

Declaration
public bool HasLifeTime { get; set; }
Property Value
Type Description
bool
| 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
Type Description
bool
| 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
Type Description
Vector2

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
public void OnPool()
| 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
Type Description
VomitGlob

The spawned VomitGlob instance.

| 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
Type Description
VomitGlob

The spawned VomitGlob instance.

Implements

IOnPool

Extension Methods

ReflectionUtilities.ReflectCallMethod(object, string, object[], BindingFlags)
ReflectionUtilities.ReflectGetField(object, string, BindingFlags)
ReflectionUtilities.ReflectGetMethod(object, string, BindingFlags)
ReflectionUtilities.ReflectGetProperty(object, string, BindingFlags)
ReflectionUtilities.ReflectSetField(object, string, object, BindingFlags)
ReflectionUtilities.ReflectSetProperty(object, string, object, BindingFlags)
CoroutineUtilities.RunCoroutineWhile<T>(T, IEnumerator, Func<bool>)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾