Swarm Demo 1.6
Demonstration of the swarm object manager
Public Member Functions | Public Attributes | Properties
AsteroidManager Class Reference

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...

List of all members.

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

Detailed Description

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.


Member Function Documentation

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.

Parameters:
asteroidTypeThe type of prefab for the old asteroid
positionThe position of the old asteroid
override void AsteroidManager.Initialize ( )

Overrides the SwarmItemManager's Initialize method.


Member Data Documentation

the size of the asteroid field

Initial count for the large asteroids.

Initial count for the medium asteroids.

Initial count for the small asteroids.

The maximum spin to use for the random spin calculation.

The maximum velocity to use for the random velocity calculation (2D: x and y)

The minimum spin to use for the random spin calculation.

The minimum velocity to use for the random velocity calculation (2D: x and y)


Property Documentation

float AsteroidManager.FieldRadiusSquared [get]

accessor for the square of the field radius


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