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

Main pooling singleton script for bullet / object pool usage. More...

Inheritance diagram for ObjectPoolManager:

Public Member Functions

GameObject GetUsableStandardHorizontalBullet ()
GameObject GetUsableSphereBullet ()
GameObject GetUsableTurretBullet ()
GameObject GetUsableBeam1Bullet ()
GameObject GetUsableBeam2Bullet ()
GameObject GetUsableBeam3Bullet ()
GameObject GetUsableBeam4Bullet ()
GameObject GetUsableBeam5Bullet ()
GameObject GetUsableBeam6Bullet ()
GameObject GetUsableSparkParticle ()
GameObject GetUsableBloodSplatterParticleEffect ()

Static Public Member Functions

static int GetActiveBulletCount ()
 Count of active (on-screen) bullets from all bullet pools. O(n) over pooled bullets; safe to call ~1/sec.

Public Attributes

GameObject standardHorizonalBulletPrefab
GameObject sphereBulletPrefab
GameObject sparkPrefab
GameObject bloodPrefab
GameObject beam1Prefab
GameObject beam2Prefab
GameObject beam3Prefab
GameObject beam4Prefab
GameObject beam5Prefab
GameObject beam6Prefab
int numStandardHorizonalBulletsToSpawn
int numSphereBulletsToSpawn
int numSparksToSpawn
int numBloodParticleToSpawn
int numTurretBulletsToSpawn
int numBeam1BulletsToSpawn
int numBeam2BulletsToSpawn
int numBeam3BulletsToSpawn
int numBeam4BulletsToSpawn
int numBeam5BulletsToSpawn
int numBeam6BulletsToSpawn
bool tagAsTurretBullets
 Only really used for demo scenes - bullets can be made to use the layer for turret bullets, this is so that the demo scene player can have his/her own bullets that apply damage to the turrets, and the turrets can have their own bullets.

Static Public Attributes

static ObjectPoolManager instance
static List< GameObject > standardHorizontalBulletObjectPool
static List< GameObject > sphereBulletObjectPool
static List< GameObject > sparkObjectPool
static List< GameObject > bloodObjectPool
static List< GameObject > turretBulletObjectPool
static List< GameObject > beam1Pool
static List< GameObject > beam2Pool
static List< GameObject > beam3Pool
static List< GameObject > beam4Pool
static List< GameObject > beam5Pool
static List< GameObject > beam6Pool

Detailed Description

Main pooling singleton script for bullet / object pool usage.

The WeaponSystem will use this to retrieve re-usable bullets from defined bullet pools, allowing for faster performance when firing lots of bullets.

Member Function Documentation

◆ GetActiveBulletCount()

int ObjectPoolManager.GetActiveBulletCount ( )
static

Count of active (on-screen) bullets from all bullet pools. O(n) over pooled bullets; safe to call ~1/sec.

◆ GetUsableBeam1Bullet()

GameObject ObjectPoolManager.GetUsableBeam1Bullet ( )

◆ GetUsableBeam2Bullet()

GameObject ObjectPoolManager.GetUsableBeam2Bullet ( )

◆ GetUsableBeam3Bullet()

GameObject ObjectPoolManager.GetUsableBeam3Bullet ( )

◆ GetUsableBeam4Bullet()

GameObject ObjectPoolManager.GetUsableBeam4Bullet ( )

◆ GetUsableBeam5Bullet()

GameObject ObjectPoolManager.GetUsableBeam5Bullet ( )

◆ GetUsableBeam6Bullet()

GameObject ObjectPoolManager.GetUsableBeam6Bullet ( )

◆ GetUsableBloodSplatterParticleEffect()

GameObject ObjectPoolManager.GetUsableBloodSplatterParticleEffect ( )

◆ GetUsableSparkParticle()

GameObject ObjectPoolManager.GetUsableSparkParticle ( )

◆ GetUsableSphereBullet()

GameObject ObjectPoolManager.GetUsableSphereBullet ( )

◆ GetUsableStandardHorizontalBullet()

GameObject ObjectPoolManager.GetUsableStandardHorizontalBullet ( )

◆ GetUsableTurretBullet()

GameObject ObjectPoolManager.GetUsableTurretBullet ( )

Member Data Documentation

◆ beam1Pool

List<GameObject> ObjectPoolManager.beam1Pool
static

◆ beam1Prefab

GameObject ObjectPoolManager.beam1Prefab

◆ beam2Pool

List<GameObject> ObjectPoolManager.beam2Pool
static

◆ beam2Prefab

GameObject ObjectPoolManager.beam2Prefab

◆ beam3Pool

List<GameObject> ObjectPoolManager.beam3Pool
static

◆ beam3Prefab

GameObject ObjectPoolManager.beam3Prefab

◆ beam4Pool

List<GameObject> ObjectPoolManager.beam4Pool
static

◆ beam4Prefab

GameObject ObjectPoolManager.beam4Prefab

◆ beam5Pool

List<GameObject> ObjectPoolManager.beam5Pool
static

◆ beam5Prefab

GameObject ObjectPoolManager.beam5Prefab

◆ beam6Pool

List<GameObject> ObjectPoolManager.beam6Pool
static

◆ beam6Prefab

GameObject ObjectPoolManager.beam6Prefab

◆ bloodObjectPool

List<GameObject> ObjectPoolManager.bloodObjectPool
static

◆ bloodPrefab

GameObject ObjectPoolManager.bloodPrefab

◆ instance

ObjectPoolManager ObjectPoolManager.instance
static

◆ numBeam1BulletsToSpawn

int ObjectPoolManager.numBeam1BulletsToSpawn

◆ numBeam2BulletsToSpawn

int ObjectPoolManager.numBeam2BulletsToSpawn

◆ numBeam3BulletsToSpawn

int ObjectPoolManager.numBeam3BulletsToSpawn

◆ numBeam4BulletsToSpawn

int ObjectPoolManager.numBeam4BulletsToSpawn

◆ numBeam5BulletsToSpawn

int ObjectPoolManager.numBeam5BulletsToSpawn

◆ numBeam6BulletsToSpawn

int ObjectPoolManager.numBeam6BulletsToSpawn

◆ numBloodParticleToSpawn

int ObjectPoolManager.numBloodParticleToSpawn

◆ numSparksToSpawn

int ObjectPoolManager.numSparksToSpawn

◆ numSphereBulletsToSpawn

int ObjectPoolManager.numSphereBulletsToSpawn

◆ numStandardHorizonalBulletsToSpawn

int ObjectPoolManager.numStandardHorizonalBulletsToSpawn

◆ numTurretBulletsToSpawn

int ObjectPoolManager.numTurretBulletsToSpawn

◆ sparkObjectPool

List<GameObject> ObjectPoolManager.sparkObjectPool
static

◆ sparkPrefab

GameObject ObjectPoolManager.sparkPrefab

◆ sphereBulletObjectPool

List<GameObject> ObjectPoolManager.sphereBulletObjectPool
static

◆ sphereBulletPrefab

GameObject ObjectPoolManager.sphereBulletPrefab

◆ standardHorizonalBulletPrefab

GameObject ObjectPoolManager.standardHorizonalBulletPrefab

◆ standardHorizontalBulletObjectPool

List<GameObject> ObjectPoolManager.standardHorizontalBulletObjectPool
static

◆ tagAsTurretBullets

bool ObjectPoolManager.tagAsTurretBullets

Only really used for demo scenes - bullets can be made to use the layer for turret bullets, this is so that the demo scene player can have his/her own bullets that apply damage to the turrets, and the turrets can have their own bullets.

◆ turretBulletObjectPool

List<GameObject> ObjectPoolManager.turretBulletObjectPool
static

The documentation for this class was generated from the following file: