C# Class Aura.Channel.World.CreatureSpawner

Defines area in which certain creatures are spawned, up to a certain amount.
Inheritance: IDisposable
Afficher le fichier Open project: aura-project/aura Class Usage Examples

Méthodes publiques

Méthode Description
CreatureSpawner ( int raceId, int amount, int regionId, int delay, int delayMin, int delayMax, int titles, int coordinates ) : Aura.Channel.Network.Sending

Creates new CreatureSpawner

Dispose ( ) : void

Unsubscribes from spawned creature's disappear events.

Spawn ( ) : void

Spawns as many creatures as necessary to reach this spawn's amount.

Private Methods

Méthode Description
GetRandomPosition ( ) : Point

Returns random spawn position.

IsPointInside ( Point point ) : bool

Returns true if point is within the spawn points.

OnDisappears ( Entity entity ) : void

Called when an NPC created by this spawner disappears, after it was killed.

SpawnOne ( ) : void

Spawns one creature based on this spawners settings.

Method Details

CreatureSpawner() public méthode

Creates new CreatureSpawner
public CreatureSpawner ( int raceId, int amount, int regionId, int delay, int delayMin, int delayMax, int titles, int coordinates ) : Aura.Channel.Network.Sending
raceId int Race to spawn
amount int Maximum amount to spawn
regionId int Region to spawn in
delay int Initial spawn delay in seconds
delayMin int Minimum respawn delay in seconds
delayMax int Maximum respawn delay in seconds
titles int List of random titles to apply to creatures
coordinates int Even number of coordinates, specifying the spawn area
Résultat Aura.Channel.Network.Sending

Dispose() public méthode

Unsubscribes from spawned creature's disappear events.
public Dispose ( ) : void
Résultat void

Spawn() public méthode

Spawns as many creatures as necessary to reach this spawn's amount.
public Spawn ( ) : void
Résultat void