C# 클래스 DivineRightGame.LocalMapGenerator.LocalMapGenerator

파일 보기 프로젝트 열기: Haedrian/Divine-Right 1 사용 예제들

공개 메소드들

메소드 설명
CreateBlueprint ( Maplet maplet ) : ].PlanningMapItemType[

Creates a Blueprint from a maplet

Fits ( PlanningMapItemType map, PlanningMapItemType maplet, bool edge, bool firstFit, int padding, int &startX, int &startY, PlanningMapItemType &newMap ) : bool

Determines whether a maplet will fit into a map, and if it does, where it fits

Fits ( PlanningMapItemType map, PlanningMapItemType maplet, int x, int y, PlanningMapItemType &newMap ) : bool

Determines whether a particular maplet with a fixed x and y coordiate will fit, and places it on the updated planning map if it does ONLY USE FOR ABSOLUTE POSITIONING

FuseMaps ( PlanningMapItemType map, PlanningMapItemType maplet, int startX, int startY ) : ].PlanningMapItemType[

Fuses the two maps together such that the maplet will reserve space for itself in the blueprint. This function assumes that the maps will fit and does not perform any checking. It is greatly recommended that you use Fits to invoke this function

GenerateEnemies ( MapBlock blocks, int enemyCount, string enemyType, DRObjects &actors, int level, int equipmentCost ) : ].MapBlock[

Generates enemies on the map.

GenerateMap ( int parentTileID, int parentWallID, Maplet maplet, bool preferSides, string actorType, OwningFactions owner, Actor &actors, MapletActorWanderArea &wAreas, MapletPatrolPoint &patrolRoutes, MapletFootpathNode &footpathNodes ) : ].MapBlock[

Generates a map based on the maplet assigned

GenerateVendor ( Actor newActor, MapletActor actor ) : void

Generates a vendor, adds the vendor details to the actor being created

JoinMaps ( MapBlock baseMap, MapBlock maplet, int startX, int startY ) : ].MapBlock[

Places the contents of the items in the maplet into the base map. Tiles must already have been set at this point, as this will only place mapitems.

UpdateVendorStock ( Actor actor ) : void

Updates the Vendor's stock to brand new stock

비공개 메소드들

메소드 설명
NoDoubleWall ( PlanningMapItemType map, PlanningMapItemType maplet, int mapX, int mapY ) : bool

Checks whether this positioning would create a double wall

메소드 상세

CreateBlueprint() 공개 메소드

Creates a Blueprint from a maplet
public CreateBlueprint ( Maplet maplet ) : ].PlanningMapItemType[
maplet DRObjects.LocalMapGeneratorObjects.Maplet
리턴 ].PlanningMapItemType[

Fits() 공개 메소드

Determines whether a maplet will fit into a map, and if it does, where it fits
public Fits ( PlanningMapItemType map, PlanningMapItemType maplet, bool edge, bool firstFit, int padding, int &startX, int &startY, PlanningMapItemType &newMap ) : bool
map PlanningMapItemType The original map
maplet PlanningMapItemType The maplet we are trying to introduce
edge bool If this is set to true, will try to put them on the edge. Otherwise will try to be compeltly random
firstFit bool If this is set to true, and edge is set to true, it will try to fit the object in the first place it can find
padding int
startX int Where the map will fit on the X coordinate
startY int Where the map will fit on the Y coordinate
newMap PlanningMapItemType What the map will look like with the maplet inside it. Will be equivalent to map if there is no fit
리턴 bool

Fits() 공개 메소드

Determines whether a particular maplet with a fixed x and y coordiate will fit, and places it on the updated planning map if it does ONLY USE FOR ABSOLUTE POSITIONING
public Fits ( PlanningMapItemType map, PlanningMapItemType maplet, int x, int y, PlanningMapItemType &newMap ) : bool
map PlanningMapItemType
maplet PlanningMapItemType
x int
y int
newMap PlanningMapItemType
리턴 bool

FuseMaps() 공개 메소드

Fuses the two maps together such that the maplet will reserve space for itself in the blueprint. This function assumes that the maps will fit and does not perform any checking. It is greatly recommended that you use Fits to invoke this function
public FuseMaps ( PlanningMapItemType map, PlanningMapItemType maplet, int startX, int startY ) : ].PlanningMapItemType[
map PlanningMapItemType The base map blueprint
maplet PlanningMapItemType The maplet blueprint
startX int Where on the x coordinate the maplet will begin
startY int Where on the Y coordinate the maplet will begin
리턴 ].PlanningMapItemType[

GenerateEnemies() 공개 메소드

Generates enemies on the map.
public GenerateEnemies ( MapBlock blocks, int enemyCount, string enemyType, DRObjects &actors, int level, int equipmentCost ) : ].MapBlock[
blocks DRObjects.MapBlock
enemyCount int
enemyType string
actors DRObjects
level int
equipmentCost int
리턴 ].MapBlock[

GenerateMap() 공개 메소드

Generates a map based on the maplet assigned
public GenerateMap ( int parentTileID, int parentWallID, Maplet maplet, bool preferSides, string actorType, OwningFactions owner, Actor &actors, MapletActorWanderArea &wAreas, MapletPatrolPoint &patrolRoutes, MapletFootpathNode &footpathNodes ) : ].MapBlock[
parentTileID int The ID of the tiles used in the parent maplet item
parentWallID int The wall that the parent has
maplet DRObjects.LocalMapGeneratorObjects.Maplet The maplet to generate
preferSides bool
actorType string The type of actors to generate
owner OwningFactions The owner of the map. Any maplet items which don't belong will be hidden
actors DRObjects.Actor The actors which we have generated
wAreas DRObjects.LocalMapGeneratorObjects.MapletActorWanderArea
patrolRoutes DRObjects.LocalMapGeneratorObjects.MapletPatrolPoint
footpathNodes DRObjects.LocalMapGeneratorObjects.MapletFootpathNode
리턴 ].MapBlock[

GenerateVendor() 공개 메소드

Generates a vendor, adds the vendor details to the actor being created
public GenerateVendor ( Actor newActor, MapletActor actor ) : void
newActor DRObjects.Actor
actor DRObjects.LocalMapGeneratorObjects.MapletActor
리턴 void

JoinMaps() 공개 메소드

Places the contents of the items in the maplet into the base map. Tiles must already have been set at this point, as this will only place mapitems.
public JoinMaps ( MapBlock baseMap, MapBlock maplet, int startX, int startY ) : ].MapBlock[
baseMap DRObjects.MapBlock The Base Map
maplet DRObjects.MapBlock The maplet items to place
startX int The x coordinate on the basemap where to start
startY int The y coordinate on the basemap where to start
리턴 ].MapBlock[

UpdateVendorStock() 공개 메소드

Updates the Vendor's stock to brand new stock
public UpdateVendorStock ( Actor actor ) : void
actor DRObjects.Actor
리턴 void