Explosion Class

Summary

A simple spherical explosion which grows then shrinks over time and uses the Weaver.Examples.DamageSystem to notify objects that it hits.
Assembly
Weaver.dll
Namespace
Weaver.Examples
Interfaces
Base Types
graph BT Type-->Base0["PoolableBehaviour<Explosion>"] Base0-->Base1["MonoBehaviour"] Type-.->Interface0["IPoolable"] click Interface0 "/weaver/api/Weaver/IPoolable" Type["Explosion"] class Type type-node

Syntax

public sealed class Explosion : PoolableBehaviour<Explosion>, IPoolable

Properties

Name Value Summary
Duration float
The length of time this explosion will be active for (in seconds).
MaxRadius float
The maximum radius this explosion will grow to.
PointValue int
The number of points this explosion will give the player for each new object it destroys.
Source IDealDamage
The owner of this explosion.

Methods

Name Value Summary
Explode(IDealDamage, Vector3, int) void
Initializes and activates this explosion.
OnRelease() void
Called when this object is released back to its Weaver.ObjectPool`1. Resets its values back to their defaults.

Extension Methods

Name Value Summary
TryReleaseOrDestroyGameObject<Explosion>() bool
If the `behaviour` was created by an Weaver.ObjectPool`1 this method releases the `behaviour` to it, disables its UnityEngine.GameObject, and returns true. Otherwise this method destroys the UnityEngine.GameObject and returns false.