C# Класс Aura.Channel.World.Dungeons.Dungeon

Represents a dungeon with its regions.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddBoss ( int raceId, int amount = 1 ) : void

Adds boss to list of bosses to spawn.

AddChest ( Prop chest ) : void

Adds chest to list of chests to spawn.

BossDoorBehavior ( Creature _, Prop prop ) : void

Behavior for this dungeon's boss door.

CheckDoors ( ) : bool

Returns true if all doors except the boss door have been opened.

CheckSectionClear ( ) : void

Checks if any sections have just been cleared, and calls the corresponding script method.

Complete ( ) : void
CompleteManually ( bool val ) : void

Sets whether the dungeon is completed automatically once all bosses have been killed.

If set to false, the dungeon script has to handle calling Complete, otherwise the dungeon won't be completable.

CountPlayers ( ) : int

Returns amount of players in all regions that are part of the dungeon.

Dungeon ( long instanceId, string dungeonName, int itemId, int seed, int floorPlan, Creature creature ) : Aura.Channel.Network.Sending

Creates new dungeon.

GetBossRoomCenter ( ) : Location

Returns the location at the center of the boss room.

GetCreators ( ) : List

Returns creators inside the dungeon. If dungeon has roles, it gets the creators by calling GetActualCreature on the RP characters.

GetCreature ( long entityId ) : Creature

Returns the creature with the given entity id if it could be found in the dungeon's regions, otherwise it returns null.

GetEndRoomCenter ( ) : Location

Returns the location at the center of the end room, behind the boss room.

GetPlayerListScrollMessage ( ) : string

Returns the text for the player location crawler.

GetRoles ( ) : List

Returns dungeon's roles registered with SetRole, sorted by their index. 0 = leader, 1 = first other party member, etc.

GetRpCharacters ( ) : List

Returns all RP characters inside the dungeon.

GetRpCharactersOrCreators ( ) : List

Returns either all RP characters or all creators currently in the dungeon, depending on whether this is an RP dungeon or not.

InitFloorRegion ( int iRegion ) : void

Initiates floor, creating puzzles and props.

InitLobbyRegion ( int iRegion ) : void

Initiates lobby, adding behavior to the stairs and statue.

InitRegions ( ) : void

Initiates regions, spawning props

IsInside ( long entityId ) : bool

Returns true if a creature with the given id is inside this dungeon.

OnPlayerEntersLobby ( Creature creature ) : void

Called when a creature enters the lobby region.

PlayCutscene ( string cutsceneName ) : void

Plays cutscene for all party members.

PlayCutscene ( string cutsceneName, Action onFinish ) : void

Plays cutscene for all party members.

RemoveAllPlayers ( ) : void

Removes all players from dungeon.

SetRole ( int index, string actorName ) : void

Registers a role-playing character.

Приватные методы

Метод Описание
CreatePuzzles ( int iRegion ) : void

Calls OnCreate on all of region's puzzles.

GeneratePuzzles ( int iFloor ) : void

Generates random puzzles for the floor.

GenerateRegions ( ) : void

Generates lobby and floor regions.

OnBossDeath ( Creature creature, Creature killer ) : void

Raised when one of the bosses dies.

Rotation ( int direction ) : float

Returns the radian rotation for the given dungeon direction.

TODO: Move somewhere? Direction maybe? Or an extension?

SpawnTreasureChests ( ) : void

Spawns treasure chests in treasure room.

Описание методов

AddBoss() публичный Метод

Adds boss to list of bosses to spawn.
public AddBoss ( int raceId, int amount = 1 ) : void
raceId int
amount int
Результат void

AddChest() публичный Метод

Adds chest to list of chests to spawn.
public AddChest ( Prop chest ) : void
chest Aura.Channel.World.Entities.Prop
Результат void

BossDoorBehavior() публичный Метод

Behavior for this dungeon's boss door.
public BossDoorBehavior ( Creature _, Prop prop ) : void
_ Aura.Channel.World.Entities.Creature
prop Aura.Channel.World.Entities.Prop
Результат void

CheckDoors() публичный Метод

Returns true if all doors except the boss door have been opened.
public CheckDoors ( ) : bool
Результат bool

CheckSectionClear() публичный Метод

Checks if any sections have just been cleared, and calls the corresponding script method.
public CheckSectionClear ( ) : void
Результат void

Complete() публичный Метод

public Complete ( ) : void
Результат void

CompleteManually() публичный Метод

Sets whether the dungeon is completed automatically once all bosses have been killed.
If set to false, the dungeon script has to handle calling Complete, otherwise the dungeon won't be completable.
public CompleteManually ( bool val ) : void
val bool
Результат void

CountPlayers() публичный Метод

Returns amount of players in all regions that are part of the dungeon.
public CountPlayers ( ) : int
Результат int

Dungeon() публичный Метод

Creates new dungeon.
public Dungeon ( long instanceId, string dungeonName, int itemId, int seed, int floorPlan, Creature creature ) : Aura.Channel.Network.Sending
instanceId long
dungeonName string
itemId int
seed int
floorPlan int
creature Aura.Channel.World.Entities.Creature
Результат Aura.Channel.Network.Sending

GetBossRoomCenter() публичный Метод

Returns the location at the center of the boss room.
public GetBossRoomCenter ( ) : Location
Результат Location

GetCreators() публичный Метод

Returns creators inside the dungeon. If dungeon has roles, it gets the creators by calling GetActualCreature on the RP characters.
public GetCreators ( ) : List
Результат List

GetCreature() публичный Метод

Returns the creature with the given entity id if it could be found in the dungeon's regions, otherwise it returns null.
public GetCreature ( long entityId ) : Creature
entityId long
Результат Aura.Channel.World.Entities.Creature

GetEndRoomCenter() публичный Метод

Returns the location at the center of the end room, behind the boss room.
public GetEndRoomCenter ( ) : Location
Результат Location

GetPlayerListScrollMessage() публичный Метод

Returns the text for the player location crawler.
public GetPlayerListScrollMessage ( ) : string
Результат string

GetRoles() публичный Метод

Returns dungeon's roles registered with SetRole, sorted by their index. 0 = leader, 1 = first other party member, etc.
public GetRoles ( ) : List
Результат List

GetRpCharacters() публичный Метод

Returns all RP characters inside the dungeon.
public GetRpCharacters ( ) : List
Результат List

GetRpCharactersOrCreators() публичный Метод

Returns either all RP characters or all creators currently in the dungeon, depending on whether this is an RP dungeon or not.
public GetRpCharactersOrCreators ( ) : List
Результат List

InitFloorRegion() публичный Метод

Initiates floor, creating puzzles and props.
public InitFloorRegion ( int iRegion ) : void
iRegion int
Результат void

InitLobbyRegion() публичный Метод

Initiates lobby, adding behavior to the stairs and statue.
public InitLobbyRegion ( int iRegion ) : void
iRegion int
Результат void

InitRegions() публичный Метод

Initiates regions, spawning props
public InitRegions ( ) : void
Результат void

IsInside() публичный Метод

Returns true if a creature with the given id is inside this dungeon.
public IsInside ( long entityId ) : bool
entityId long
Результат bool

OnPlayerEntersLobby() публичный Метод

Called when a creature enters the lobby region.
public OnPlayerEntersLobby ( Creature creature ) : void
creature Aura.Channel.World.Entities.Creature
Результат void

PlayCutscene() публичный Метод

Plays cutscene for all party members.
public PlayCutscene ( string cutsceneName ) : void
cutsceneName string
Результат void

PlayCutscene() публичный Метод

Plays cutscene for all party members.
public PlayCutscene ( string cutsceneName, Action onFinish ) : void
cutsceneName string
onFinish Action
Результат void

RemoveAllPlayers() публичный Метод

Removes all players from dungeon.
public RemoveAllPlayers ( ) : void
Результат void

SetRole() публичный Метод

Registers a role-playing character.
public SetRole ( int index, string actorName ) : void
index int
actorName string
Результат void