C# Class OpenRA.Map

Show file Open project: OpenRA/OpenRA Class Usage Examples

Public Properties

Property Type Description
ActorDefinitions List
Author string
Bounds System.Drawing.Rectangle
Categories string[]
Grid MapGrid
LockPreview bool
MusicDefinitions MiniYaml
NotificationDefinitions MiniYaml
PlayerDefinitions List
RequiresMod string
RuleDefinitions MiniYaml
SequenceDefinitions MiniYaml
TileFormat byte
Tileset string
Title string
TranslationDefinitions MiniYaml
Visibility MapVisibility
VoiceDefinitions MiniYaml
VoxelSequenceDefinitions MiniYaml
WeaponDefinitions MiniYaml

Public Methods

Method Description
CellContaining ( OpenRA.WPos pos ) : OpenRA.CPos
CenterOfCell ( OpenRA.CPos cell ) : OpenRA.WPos
CenterOfSubCell ( OpenRA.CPos cell, SubCell subCell ) : OpenRA.WPos
ChooseClosestEdgeCell ( OpenRA.CPos cell ) : OpenRA.CPos
ChooseClosestEdgeCell ( MPos uv ) : MPos
ChooseClosestMatchingEdgeCell ( OpenRA.CPos cell, bool>.Func match ) : OpenRA.CPos
ChooseRandomCell ( MersenneTwister rand ) : OpenRA.CPos
ChooseRandomEdgeCell ( MersenneTwister rand ) : OpenRA.CPos
Clamp ( OpenRA.CPos cell ) : OpenRA.CPos
Clamp ( MPos uv ) : MPos
Clamp ( OpenRA.PPos puv ) : OpenRA.PPos
ComputeUID ( IReadOnlyPackage package ) : string
Contains ( OpenRA.CPos cell ) : bool
Contains ( MPos uv ) : bool
Contains ( OpenRA.PPos puv ) : bool
DistanceAboveTerrain ( OpenRA.WPos pos ) : WDist
DistanceToEdge ( OpenRA.WPos pos, OpenRA.WVec dir ) : WDist
Exists ( string filename ) : bool
FacingBetween ( OpenRA.CPos cell, OpenRA.CPos towards, int fallbackfacing ) : int
FindTilesInAnnulus ( OpenRA.CPos center, int minRange, int maxRange, bool allowOutsideBounds = false ) : IEnumerable
FindTilesInCircle ( OpenRA.CPos center, int maxRange, bool allowOutsideBounds = false ) : IEnumerable
FixOpenAreas ( ) : void
GetTerrainIndex ( OpenRA.CPos cell ) : byte
GetTerrainInfo ( OpenRA.CPos cell ) : TerrainTypeInfo
InitializeCellProjection ( ) : void
Map ( OpenRA.ModData modData, IReadOnlyPackage package ) : System
Map ( OpenRA.ModData modData, TileSet tileset, int width, int height ) : System

Initializes a new map created by the editor or importer. The map will not receive a valid UID until after it has been saved and reloaded.

Open ( string filename ) : Stream
PostInit ( ) : void
ProjectedCellCovering ( OpenRA.WPos pos ) : OpenRA.PPos
ProjectedCellsCovering ( MPos uv ) : OpenRA.PPos[]
Resize ( int width, int height ) : void
Save ( IReadWritePackage toPackage ) : void
SaveBinaryData ( ) : byte[]
SavePreview ( ) : byte[]
SetBounds ( PPos tl, PPos br ) : void
TryGetPackageContaining ( string path, IReadOnlyPackage &package, string &filename ) : bool
TryOpen ( string filename, Stream &s ) : bool
Unproject ( PPos puv ) : List
UpdateProjection ( CPos cell ) : void

Private Methods

Method Description
ContainsAllProjectedCellsCovering ( MPos uv ) : bool
ProjectCellInner ( MPos uv ) : OpenRA.PPos[]
UpdateEdgeCells ( ) : List

Method Details

CellContaining() public method

public CellContaining ( OpenRA.WPos pos ) : OpenRA.CPos
pos OpenRA.WPos
return OpenRA.CPos

CenterOfCell() public method

public CenterOfCell ( OpenRA.CPos cell ) : OpenRA.WPos
cell OpenRA.CPos
return OpenRA.WPos

CenterOfSubCell() public method

public CenterOfSubCell ( OpenRA.CPos cell, SubCell subCell ) : OpenRA.WPos
cell OpenRA.CPos
subCell SubCell
return OpenRA.WPos

ChooseClosestEdgeCell() public method

public ChooseClosestEdgeCell ( OpenRA.CPos cell ) : OpenRA.CPos
cell OpenRA.CPos
return OpenRA.CPos

ChooseClosestEdgeCell() public method

public ChooseClosestEdgeCell ( MPos uv ) : MPos
uv MPos
return MPos

ChooseClosestMatchingEdgeCell() public method

public ChooseClosestMatchingEdgeCell ( OpenRA.CPos cell, bool>.Func match ) : OpenRA.CPos
cell OpenRA.CPos
match bool>.Func
return OpenRA.CPos

ChooseRandomCell() public method

public ChooseRandomCell ( MersenneTwister rand ) : OpenRA.CPos
rand MersenneTwister
return OpenRA.CPos

ChooseRandomEdgeCell() public method

public ChooseRandomEdgeCell ( MersenneTwister rand ) : OpenRA.CPos
rand MersenneTwister
return OpenRA.CPos

Clamp() public method

public Clamp ( OpenRA.CPos cell ) : OpenRA.CPos
cell OpenRA.CPos
return OpenRA.CPos

Clamp() public method

public Clamp ( MPos uv ) : MPos
uv MPos
return MPos

Clamp() public method

public Clamp ( OpenRA.PPos puv ) : OpenRA.PPos
puv OpenRA.PPos
return OpenRA.PPos

ComputeUID() public static method

public static ComputeUID ( IReadOnlyPackage package ) : string
package IReadOnlyPackage
return string

Contains() public method

public Contains ( OpenRA.CPos cell ) : bool
cell OpenRA.CPos
return bool

Contains() public method

public Contains ( MPos uv ) : bool
uv MPos
return bool

Contains() public method

public Contains ( OpenRA.PPos puv ) : bool
puv OpenRA.PPos
return bool

DistanceAboveTerrain() public method

public DistanceAboveTerrain ( OpenRA.WPos pos ) : WDist
pos OpenRA.WPos
return WDist

DistanceToEdge() public method

public DistanceToEdge ( OpenRA.WPos pos, OpenRA.WVec dir ) : WDist
pos OpenRA.WPos
dir OpenRA.WVec
return WDist

Exists() public method

public Exists ( string filename ) : bool
filename string
return bool

FacingBetween() public method

public FacingBetween ( OpenRA.CPos cell, OpenRA.CPos towards, int fallbackfacing ) : int
cell OpenRA.CPos
towards OpenRA.CPos
fallbackfacing int
return int

FindTilesInAnnulus() public method

public FindTilesInAnnulus ( OpenRA.CPos center, int minRange, int maxRange, bool allowOutsideBounds = false ) : IEnumerable
center OpenRA.CPos
minRange int
maxRange int
allowOutsideBounds bool
return IEnumerable

FindTilesInCircle() public method

public FindTilesInCircle ( OpenRA.CPos center, int maxRange, bool allowOutsideBounds = false ) : IEnumerable
center OpenRA.CPos
maxRange int
allowOutsideBounds bool
return IEnumerable

FixOpenAreas() public method

public FixOpenAreas ( ) : void
return void

GetTerrainIndex() public method

public GetTerrainIndex ( OpenRA.CPos cell ) : byte
cell OpenRA.CPos
return byte

GetTerrainInfo() public method

public GetTerrainInfo ( OpenRA.CPos cell ) : TerrainTypeInfo
cell OpenRA.CPos
return TerrainTypeInfo

InitializeCellProjection() public method

public InitializeCellProjection ( ) : void
return void

Map() public method

public Map ( OpenRA.ModData modData, IReadOnlyPackage package ) : System
modData OpenRA.ModData
package IReadOnlyPackage
return System

Map() public method

Initializes a new map created by the editor or importer. The map will not receive a valid UID until after it has been saved and reloaded.
public Map ( OpenRA.ModData modData, TileSet tileset, int width, int height ) : System
modData OpenRA.ModData
tileset TileSet
width int
height int
return System

Open() public method

public Open ( string filename ) : Stream
filename string
return Stream

PostInit() public method

public PostInit ( ) : void
return void

ProjectedCellCovering() public method

public ProjectedCellCovering ( OpenRA.WPos pos ) : OpenRA.PPos
pos OpenRA.WPos
return OpenRA.PPos

ProjectedCellsCovering() public method

public ProjectedCellsCovering ( MPos uv ) : OpenRA.PPos[]
uv MPos
return OpenRA.PPos[]

Resize() public method

public Resize ( int width, int height ) : void
width int
height int
return void

Save() public method

public Save ( IReadWritePackage toPackage ) : void
toPackage IReadWritePackage
return void

SaveBinaryData() public method

public SaveBinaryData ( ) : byte[]
return byte[]

SavePreview() public method

public SavePreview ( ) : byte[]
return byte[]

SetBounds() public method

public SetBounds ( PPos tl, PPos br ) : void
tl PPos
br PPos
return void

TryGetPackageContaining() public method

public TryGetPackageContaining ( string path, IReadOnlyPackage &package, string &filename ) : bool
path string
package IReadOnlyPackage
filename string
return bool

TryOpen() public method

public TryOpen ( string filename, Stream &s ) : bool
filename string
s Stream
return bool

Unproject() public method

public Unproject ( PPos puv ) : List
puv PPos
return List

UpdateProjection() public method

public UpdateProjection ( CPos cell ) : void
cell CPos
return void

Property Details

ActorDefinitions public property

public List ActorDefinitions
return List

Author public property

public string Author
return string

Bounds public property

public Rectangle,System.Drawing Bounds
return System.Drawing.Rectangle

Categories public property

public string[] Categories
return string[]

Grid public property

public MapGrid,OpenRA Grid
return MapGrid

LockPreview public property

public bool LockPreview
return bool

MusicDefinitions public property

public MiniYaml MusicDefinitions
return MiniYaml

NotificationDefinitions public property

public MiniYaml NotificationDefinitions
return MiniYaml

PlayerDefinitions public property

public List PlayerDefinitions
return List

RequiresMod public property

public string RequiresMod
return string

RuleDefinitions public property

public MiniYaml RuleDefinitions
return MiniYaml

SequenceDefinitions public property

public MiniYaml SequenceDefinitions
return MiniYaml

TileFormat public property

public byte TileFormat
return byte

Tileset public property

public string Tileset
return string

Title public property

public string Title
return string

TranslationDefinitions public property

public MiniYaml TranslationDefinitions
return MiniYaml

Visibility public property

public MapVisibility Visibility
return MapVisibility

VoiceDefinitions public property

public MiniYaml VoiceDefinitions
return MiniYaml

VoxelSequenceDefinitions public property

public MiniYaml VoxelSequenceDefinitions
return MiniYaml

WeaponDefinitions public property

public MiniYaml WeaponDefinitions
return MiniYaml