|
2D Shooter Bullet and Weapon System for Unity 3.0.0
|
Spawns and manages DOTS enemies for the demo or benchmark scenes. More...
Public Member Functions | |
| void | SyncPositionsOnly () |
| Copy entity positions to GameObjects (for collision queries). Call before EnemyBumpSystem. | |
| Entity | SpawnEnemy () |
| Spawn one enemy at a random position within spawn bounds. | |
| Entity | SpawnEnemyAt (Vector3 position) |
| Spawn one enemy at the given position. | |
| void | DestroyEnemyEntity (Entity entity) |
| void | DestroyEnemyGameObject (GameObject go) |
Static Public Member Functions | |
| static Entity | GetEntityFromHitObject (GameObject hitObject) |
| Get the entity for a hit GameObject (handles child colliders). | |
Public Attributes | |
| GameObject | enemyPrefab |
| int | spawnCount = 50 |
| Vector4 | spawnBounds = new Vector4(-10f, -5f, 10f, 5f) |
| float | enemySpeed = 2f |
| float | enemyTurnSpeed = 4f |
| LayerMask | enemyLayerMask = ~0 |
| GameObject | bloodSplatterPrefab |
Properties | |
| static DotsEnemyManager | Instance [get] |
| LayerMask | EnemyLayerMask [get] |
Spawns and manages DOTS enemies for the demo or benchmark scenes.
Add to a GameObject and assign an enemy prefab (e.g. DotsEnemy) with SpriteRenderer, Collider2D, tag "Enemy". Ensure enemies are on a layer included in Enemy Layer Mask and in DotsBulletManager's Collision Layer Mask.
| void DotsEnemyManager.DestroyEnemyEntity | ( | Entity | entity | ) |
| void DotsEnemyManager.DestroyEnemyGameObject | ( | GameObject | go | ) |
|
static |
Get the entity for a hit GameObject (handles child colliders).
| Entity DotsEnemyManager.SpawnEnemy | ( | ) |
Spawn one enemy at a random position within spawn bounds.
| Entity DotsEnemyManager.SpawnEnemyAt | ( | Vector3 | position | ) |
Spawn one enemy at the given position.
| void DotsEnemyManager.SyncPositionsOnly | ( | ) |
Copy entity positions to GameObjects (for collision queries). Call before EnemyBumpSystem.
| GameObject DotsEnemyManager.bloodSplatterPrefab |
| LayerMask DotsEnemyManager.enemyLayerMask = ~0 |
| GameObject DotsEnemyManager.enemyPrefab |
| float DotsEnemyManager.enemySpeed = 2f |
| float DotsEnemyManager.enemyTurnSpeed = 4f |
| Vector4 DotsEnemyManager.spawnBounds = new Vector4(-10f, -5f, 10f, 5f) |
| int DotsEnemyManager.spawnCount = 50 |
|
get |
|
staticget |