|
2D Shooter Bullet and Weapon System for Unity 3.0.0
|
Manages DOTS bullet entity spawning and syncs entity positions to pooled GameObjects for rendering and physics. More...
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] |
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.
| void DotsBulletManager.DestroyBulletEntity | ( | Entity | entity | ) |
|
static |
Ensures a DotsBulletManager exists in the scene. Call from any script that needs DOTS bullets.
| void DotsBulletManager.ProcessBulletHit | ( | Entity | entity, |
| Vector2 | hitPoint, | ||
| Vector2 | hitNormal, | ||
| GameObject | hitObject ) |
| 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.
| void DotsBulletManager.UpdateBulletDirection | ( | Entity | entity, |
| float | newDirectionAngle ) |
| LayerMask DotsBulletManager.collisionLayerMask |
| bool DotsBulletManager.useDotsBullets = true |
|
get |
|
get |
|
staticget |