2D Shooter Bullet and Weapon System for Unity 3.0.0
Loading...
Searching...
No Matches
BloodSplatterPool Class Reference

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 ()

Detailed Description

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.

Constructor & Destructor Documentation

◆ BloodSplatterPool()

BloodSplatterPool.BloodSplatterPool ( GameObject prefab,
Transform parent,
float fadeDuration = 3f,
int initialSize = 64,
int expandBy = 32 )

Member Function Documentation

◆ Spawn()

void BloodSplatterPool.Spawn ( Vector3 position)

◆ Tick()

void BloodSplatterPool.Tick ( )

The documentation for this class was generated from the following file:
  • C:/git/2dshooterweaponsystem/Assets/2DShooterWeaponSystem/Scripts/DemoRelated/BloodSplatterPool.cs