|
2D Shooter Bullet and Weapon System for Unity 3.0.0
|
Object pool and centralized update for blood splatters. More...
Public Member Functions | |
| BloodSplatterPool (GameObject prefab, Transform parent, float fadeDuration=3f, int initialSize=64, int expandBy=32) | |
| void | Spawn (Vector3 position) |
| void | Tick () |
Object pool and centralized update for blood splatters.
Reuses GameObjects instead of Instantiate/Destroy, uses MaterialPropertyBlock to avoid material instances, and updates all active splatters in a single loop to minimize per-object overhead.
| BloodSplatterPool.BloodSplatterPool | ( | GameObject | prefab, |
| Transform | parent, | ||
| float | fadeDuration = 3f, | ||
| int | initialSize = 64, | ||
| int | expandBy = 32 ) |
| void BloodSplatterPool.Spawn | ( | Vector3 | position | ) |
| void BloodSplatterPool.Tick | ( | ) |