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

Manages DOTS bullet entity spawning and syncs entity positions to pooled GameObjects for rendering and physics. More...

Inheritance diagram for DotsBulletManager:

Public Member Functions

Entity SpawnBullet (Vector3 position, float directionAngle, float speed, float amplitude, float frequencyIncrement, GameObject bulletPrefabSource, Color bulletColour, bool useHitEffects, float ricochetChancePercent, bool richochetsEnabled, Bullet.BulletOwner bulletOwner)
 Spawn a bullet entity and link it to a pooled GameObject.
void DestroyBulletEntity (Entity entity)
void ProcessBulletHit (Entity entity, Vector2 hitPoint, Vector2 hitNormal, GameObject hitObject)
void UpdateBulletDirection (Entity entity, float newDirectionAngle)

Static Public Member Functions

static DotsBulletManager GetOrCreate ()
 Ensures a DotsBulletManager exists in the scene. Call from any script that needs DOTS bullets.

Public Attributes

bool useDotsBullets = true
LayerMask collisionLayerMask

Properties

static DotsBulletManager Instance [get]
LayerMask CollisionLayerMask [get]
int ActiveBulletCount [get]

Detailed Description

Manages DOTS bullet entity spawning and syncs entity positions to pooled GameObjects for rendering and physics.

Add this to a GameObject in the scene. WeaponSystem uses it when useDotsBullets is enabled.

Member Function Documentation

◆ DestroyBulletEntity()

void DotsBulletManager.DestroyBulletEntity ( Entity entity)

◆ GetOrCreate()

DotsBulletManager DotsBulletManager.GetOrCreate ( )
static

Ensures a DotsBulletManager exists in the scene. Call from any script that needs DOTS bullets.

◆ ProcessBulletHit()

void DotsBulletManager.ProcessBulletHit ( Entity entity,
Vector2 hitPoint,
Vector2 hitNormal,
GameObject hitObject )

◆ SpawnBullet()

Entity DotsBulletManager.SpawnBullet ( Vector3 position,
float directionAngle,
float speed,
float amplitude,
float frequencyIncrement,
GameObject bulletPrefabSource,
Color bulletColour,
bool useHitEffects,
float ricochetChancePercent,
bool richochetsEnabled,
Bullet.BulletOwner bulletOwner )

Spawn a bullet entity and link it to a pooled GameObject.

◆ UpdateBulletDirection()

void DotsBulletManager.UpdateBulletDirection ( Entity entity,
float newDirectionAngle )

Member Data Documentation

◆ collisionLayerMask

LayerMask DotsBulletManager.collisionLayerMask

◆ useDotsBullets

bool DotsBulletManager.useDotsBullets = true

Property Documentation

◆ ActiveBulletCount

int DotsBulletManager.ActiveBulletCount
get

◆ CollisionLayerMask

LayerMask DotsBulletManager.CollisionLayerMask
get

◆ Instance

DotsBulletManager DotsBulletManager.Instance
staticget

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