Swarm Demo 1.6
Demonstration of the swarm object manager
Public Types | Public Member Functions | Protected Member Functions
Asteroid Class Reference

Asteroid class that inherits from the SwarmItem. Its manager is the AsteroidManager. More...

List of all members.

Public Types

enum  ASTEROID_TYPE { Small = 0, Medium = 1, Large = 2 }
 These types should correspond with the prefabs set in the editor for the asteroid manager. More...

Public Member Functions

override void Initialize (SwarmItemManager swarmItemManager, int prefabIndex, bool debugEvents)
 Overrides the SwarmItem Initialize method, setting the originalScale member.
void Set (AsteroidManager asteroidManager, ASTEROID_TYPE asteroidType, Vector3 rotation, Vector3 velocity, Vector3 position)
 Sets the asteroids parameters.
override void FrameUpdate ()
 Overrides the SwarmItem FrameUpdate to move and rotate the asteroid.
override void OnSetParentTransform ()
 Called after being parented to the active or inactive lists.

Protected Member Functions

override void OnStateChange ()
 Called after being activated or deactivated.

Detailed Description

Asteroid class that inherits from the SwarmItem. Its manager is the AsteroidManager.


Member Enumeration Documentation

These types should correspond with the prefabs set in the editor for the asteroid manager.

Enumerator:
Small 
Medium 
Large 

Member Function Documentation

override void Asteroid.FrameUpdate ( )

Overrides the SwarmItem FrameUpdate to move and rotate the asteroid.

override void Asteroid.Initialize ( SwarmItemManager  swarmItemManager,
int  prefabIndex,
bool  debugEvents 
)

Overrides the SwarmItem Initialize method, setting the originalScale member.

override void Asteroid.OnSetParentTransform ( )

Called after being parented to the active or inactive lists.

override void Asteroid.OnStateChange ( ) [protected]

Called after being activated or deactivated.

void Asteroid.Set ( AsteroidManager  asteroidManager,
ASTEROID_TYPE  asteroidType,
Vector3  rotation,
Vector3  velocity,
Vector3  position 
)

Sets the asteroids parameters.

Parameters:
asteroidManagerThe manager for this item
asteroidTypeThe type of asteroid (size)
rotationRotation of the asteroid
velocityVelocity of the asteroid
positionPosition of the asteroid

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