|
Swarm Demo 1.6
Demonstration of the swarm object manager
|
This is an example of a SwarmItemManager that handles creation of SwarmItem asteroids. It is also called to break up asteroids when they are hit by bullets. More...
Public Member Functions | |
| override void | Initialize () |
| Overrides the SwarmItemManager's Initialize method. | |
| void | BreakUpAsteroid (Asteroid.ASTEROID_TYPE asteroidType, Vector3 position) |
| Creates new asteroids of a smaller size where the old asteroid was, giving the illusion of a crumbling rock. | |
Public Attributes | |
| int | initialSmallAsteroidCount |
| Initial count for the small asteroids. | |
| int | initialMediumAsteroidCount |
| Initial count for the medium asteroids. | |
| int | initialLargeAsteroidCount |
| Initial count for the large asteroids. | |
| Vector3 | minimumSpin |
| The minimum spin to use for the random spin calculation. | |
| Vector3 | maximumSpin |
| The maximum spin to use for the random spin calculation. | |
| Vector2 | minimumVelocity |
| The minimum velocity to use for the random velocity calculation (2D: x and y) | |
| Vector2 | maximumVelocity |
| The maximum velocity to use for the random velocity calculation (2D: x and y) | |
| float | fieldRadius |
| the size of the asteroid field | |
Properties | |
| float | FieldRadiusSquared [get] |
| accessor for the square of the field radius | |
This is an example of a SwarmItemManager that handles creation of SwarmItem asteroids. It is also called to break up asteroids when they are hit by bullets.
| void AsteroidManager.BreakUpAsteroid | ( | Asteroid.ASTEROID_TYPE | asteroidType, |
| Vector3 | position | ||
| ) |
Creates new asteroids of a smaller size where the old asteroid was, giving the illusion of a crumbling rock.
| asteroidType | The type of prefab for the old asteroid |
| position | The position of the old asteroid |
| override void AsteroidManager.Initialize | ( | ) |
Overrides the SwarmItemManager's Initialize method.
the size of the asteroid field
Initial count for the large asteroids.
Initial count for the medium asteroids.
Initial count for the small asteroids.
| Vector3 AsteroidManager.maximumSpin |
The maximum spin to use for the random spin calculation.
| Vector2 AsteroidManager.maximumVelocity |
The maximum velocity to use for the random velocity calculation (2D: x and y)
| Vector3 AsteroidManager.minimumSpin |
The minimum spin to use for the random spin calculation.
| Vector2 AsteroidManager.minimumVelocity |
The minimum velocity to use for the random velocity calculation (2D: x and y)
float AsteroidManager.FieldRadiusSquared [get] |
accessor for the square of the field radius
1.7.4