ObjectSpawner Class Reference

Spawns items at the position and orientation of the spawner. More...

List of all members.

Public Member Functions

void DropToFloor ()
 Drops this spawner to the floor, offset by spawnHeight.
void Awake ()
 Validates the state of this spawner at startup.
void xOnDrawGizmos ()
 Editor GUI drawing method for all spawners.
void xOnDrawGizmosSelected ()
 Editor GUI drawing method for selected spawners.

Public Attributes

float respawnTime = 10
 The time in seconds to wait before respawning a destroyed object.
GameObject prefab
 The object of which to spawn copies.
Color color = Color.cyan
float spawnHeight = 1
 The height above the ground to position this spawner when applying the Drop To Floor context item.
bool dropToFloor = false
 Whether to position on the floor, offset by spawnHeight.

Detailed Description

Spawns items at the position and orientation of the spawner.

Items that are spawned and later destroyed will respawn a set period after being destroyed.

This class triggers an OnSpawn event


Member Function Documentation

void ObjectSpawner.Awake (  ) 

Validates the state of this spawner at startup.

void ObjectSpawner.DropToFloor (  ) 

Drops this spawner to the floor, offset by spawnHeight.

void ObjectSpawner.xOnDrawGizmos (  ) 

Editor GUI drawing method for all spawners.

void ObjectSpawner.xOnDrawGizmosSelected (  ) 

Editor GUI drawing method for selected spawners.


Member Data Documentation

Whether to position on the floor, offset by spawnHeight.

The object of which to spawn copies.

The time in seconds to wait before respawning a destroyed object.

The height above the ground to position this spawner when applying the Drop To Floor context item.


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

Generated on Fri Aug 21 09:09:58 2009 for Hamlington Underground Racing Association by  doxygen 1.6.0