C# 클래스 TileMap, UnderworldExporter

상속: MonoBehaviour
파일 보기 프로젝트 열기: hankmorgan/UnderworldExporter 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Background Color[]
BorderColour Color[]
BridgeTileColour Color[]
GlobalCeilingHeight int
LavaTileColour Color[]
MapNotes List[]
OnGround bool
OnLava bool
OnWater bool
OpenTileColour Color[]
StairsTileColour Color[]
TileSize int
Tiles TileInfo[]
WaterTileColour Color[]
visitTileX int
visitTileY int

공개 메소드들

메소드 설명
DrawDiagNE ( int LevelNo, Texture2D OutputTile, int TileX, int TileY, int TileWidth, int TileHeight, Color InputColour ) : void

Draws the diag NE tile.

DrawDiagNW ( int LevelNo, Texture2D OutputTile, int TileX, int TileY, int TileWidth, int TileHeight, Color InputColour ) : void

Draws the diag NW tile

DrawDiagSE ( int LevelNo, Texture2D OutputTile, int TileX, int TileY, int TileWidth, int TileHeight, Color InputColour ) : void

Draws the diag SE tile.

DrawDiagSW ( int LevelNo, Texture2D OutputTile, int TileX, int TileY, int TileWidth, int TileHeight, Color InputColour ) : void

Draws a diagonal SW tile.

GetCeilingHeight ( int LevelNo, int tileX, int tileY ) : int

Gets the height of the ceiling. Will always be the same value in UW1/2 varies in SHOCK.

GetFloorHeight ( int LevelNo, int tileX, int tileY ) : int

Gets the height of the floor for the specified tile.

GetTileType ( int tileX, int tileY ) : int

Gets the type of the tile.

GetTileType ( int LevelNo, int tileX, int tileY ) : int

Gets the type of the tile.

LoadTileMapInfo ( string fileName ) : bool

Loads the tile map info from a config file called GAMENAME+ "_tileprops.txt"

PickColour ( Color Selection ) : Color

Picks a random colour from the array of colours

PositionDetect ( ) : void

Detects where the player currently is an updates their swimming state and auto map as needed.

SetCeilingHeight ( int LevelNo, int tileX, int tileY, int newHeight ) : void

Sets the height of the ceiling.

SetFloorHeight ( int LevelNo, int tileX, int tileY, int newHeight ) : void

Sets the height of the floor.

SetTileVisited ( int LevelNo, int tileX, int tileY ) : void

Sets the tile and it's neighbours as visited. visited.

Start ( ) : void
TileMapImage ( ) : Texture2D

Generates a tile map image for the automap for the current level.

TileMapImage ( int LevelNo ) : Texture2D

Generates a tile map image for the automap for the specified level.

ValidTile ( Vector3 location ) : bool

Checks to see if the tile at a specified location is within the valid game world. (eg is rendered and is not a solid). Assumes the map is positioned at 0,0,0

current ( ) : TileInfo

Returns the current levels tile map info.

getTileVector ( int tileX, int tileY ) : Vector3

Gets the vector3 at the center of the tile specified.

isTileOpen ( int TileType ) : bool

Tells if the tile is one of the square open types

비공개 메소드들

메소드 설명
DrawDoor ( Texture2D OutputTile, int LevelNo, int TileX, int TileY, int TileWidth, int TileHeight, Color InputColour ) : void

Draws a door at the tile specified. Checks the neighbouring tiles to find out which one is open

DrawLine ( Texture2D OutputTile, int TileX, int TileY, int TileWidth, int TileHeight, Color InputColour, int Direction ) : void

Draws a line at the specified border direction.

DrawOpenTile ( int LevelNo, Texture2D OutputTile, int TileX, int TileY, int TileWidth, int TileHeight, Color InputColour ) : void

Draws the open tile. Checks the neighbouring tiles to see if it needs to draw a border.

DrawSolidTile ( Texture2D OutputTile, int TileX, int TileY, int TileWidth, int TileHeight, Color InputColour ) : void

Draws a solid tile with no border.

GetIsBridge ( int LevelNo, int tileX, int tileY ) : bool

Gets if the tile is a bridge.

GetIsDoor ( int LevelNo, int tileX, int tileY ) : bool

Gets if the tile contains a door.

GetIsLava ( int LevelNo, int tileX, int tileY ) : bool

Is the tile Lava

GetIsWater ( int LevelNo, int tileX, int tileY ) : bool

Is the tile water.

GetTileRender ( int LevelNo, int tileX, int tileY ) : int

Gets the tile render state. Only affects the automap.

GetTileVisited ( int LevelNo, int tileX, int tileY ) : bool

Has the tile been already visited.

MarkTile ( int LevelNo, int tileX, int tileY ) : void

Marks the tile as visited and checks if it is in range.

SetIsBridge ( int LevelNo, int tileX, int tileY, int iIsBridge ) : void

Marks if the tile has a bridge.

SetIsDoor ( int LevelNo, int tileX, int tileY, int iIsDoor ) : void

Sets if the tile is a door

SetIsLava ( int LevelNo, int tileX, int tileY, int iIsLava ) : void

Sets if the tile is lava.

SetIsWater ( int LevelNo, int tileX, int tileY, int iIsWater ) : void

Sets if the tile is water.

SetTileProp ( int LevelNo, int tileX, int tileY, int itileType, int iRender, int FloorHeight, int CeilingHeight, int iIsWater, int iIsDoor, int iIsLava, int iIsBridge ) : void

Sets the tile properties that are read in from tileprops.txt

SetTileRender ( int LevelNo, int tileX, int tileY, int iRender ) : void

Sets the tile render state. Only affects the automap.

SetTileType ( int LevelNo, int tileX, int tileY, int itileType ) : void

Sets the type of the tile.

fillTile ( int LevelNo, Texture2D OutputTile, int TileX, int TileY, int TileWidth, int TileHeight, Color GroundColour, Color WaterColour, Color LavaColour, Color BridgeColour ) : void

Fills in a single tile.

메소드 상세

DrawDiagNE() 공개 메소드

Draws the diag NE tile.
public DrawDiagNE ( int LevelNo, Texture2D OutputTile, int TileX, int TileY, int TileWidth, int TileHeight, Color InputColour ) : void
LevelNo int Level no.
OutputTile UnityEngine.Texture2D Output tile.
TileX int Tile x.
TileY int Tile y.
TileWidth int Tile width.
TileHeight int Tile height.
InputColour Color Input colour.
리턴 void

DrawDiagNW() 공개 메소드

Draws the diag NW tile
public DrawDiagNW ( int LevelNo, Texture2D OutputTile, int TileX, int TileY, int TileWidth, int TileHeight, Color InputColour ) : void
LevelNo int Level no.
OutputTile UnityEngine.Texture2D Output tile.
TileX int Tile x.
TileY int Tile y.
TileWidth int Tile width.
TileHeight int Tile height.
InputColour Color Input colour.
리턴 void

DrawDiagSE() 공개 메소드

Draws the diag SE tile.
public DrawDiagSE ( int LevelNo, Texture2D OutputTile, int TileX, int TileY, int TileWidth, int TileHeight, Color InputColour ) : void
LevelNo int Level no.
OutputTile UnityEngine.Texture2D Output tile.
TileX int Tile x.
TileY int Tile y.
TileWidth int Tile width.
TileHeight int Tile height.
InputColour Color Input colour.
리턴 void

DrawDiagSW() 공개 메소드

Draws a diagonal SW tile.
public DrawDiagSW ( int LevelNo, Texture2D OutputTile, int TileX, int TileY, int TileWidth, int TileHeight, Color InputColour ) : void
LevelNo int Level no.
OutputTile UnityEngine.Texture2D Output tile.
TileX int Tile x.
TileY int Tile y.
TileWidth int Tile width.
TileHeight int Tile height.
InputColour Color Input colour.
리턴 void

GetCeilingHeight() 공개 메소드

Gets the height of the ceiling. Will always be the same value in UW1/2 varies in SHOCK.
public GetCeilingHeight ( int LevelNo, int tileX, int tileY ) : int
LevelNo int Level no.
tileX int Tile x.
tileY int Tile y.
리턴 int

GetFloorHeight() 공개 메소드

Gets the height of the floor for the specified tile.
public GetFloorHeight ( int LevelNo, int tileX, int tileY ) : int
LevelNo int Level no.
tileX int Tile x.
tileY int Tile y.
리턴 int

GetTileType() 공개 메소드

Gets the type of the tile.
public GetTileType ( int tileX, int tileY ) : int
tileX int Tile x.
tileY int Tile y.
리턴 int

GetTileType() 공개 메소드

Gets the type of the tile.
public GetTileType ( int LevelNo, int tileX, int tileY ) : int
LevelNo int Level no.
tileX int Tile x.
tileY int Tile y.
리턴 int

LoadTileMapInfo() 공개 메소드

Loads the tile map info from a config file called GAMENAME+ "_tileprops.txt"
public LoadTileMapInfo ( string fileName ) : bool
fileName string File name.
리턴 bool

PickColour() 공개 메소드

Picks a random colour from the array of colours
public PickColour ( Color Selection ) : Color
Selection Color Selection.
리턴 Color

PositionDetect() 공개 메소드

Detects where the player currently is an updates their swimming state and auto map as needed.
public PositionDetect ( ) : void
리턴 void

SetCeilingHeight() 공개 메소드

Sets the height of the ceiling.
public SetCeilingHeight ( int LevelNo, int tileX, int tileY, int newHeight ) : void
LevelNo int Level no.
tileX int Tile x.
tileY int Tile y.
newHeight int New height.
리턴 void

SetFloorHeight() 공개 메소드

Sets the height of the floor.
public SetFloorHeight ( int LevelNo, int tileX, int tileY, int newHeight ) : void
LevelNo int Level no.
tileX int Tile x.
tileY int Tile y.
newHeight int New height.
리턴 void

SetTileVisited() 공개 메소드

Sets the tile and it's neighbours as visited. visited.
public SetTileVisited ( int LevelNo, int tileX, int tileY ) : void
LevelNo int Level no.
tileX int Tile x.
tileY int Tile y.
리턴 void

Start() 공개 메소드

public Start ( ) : void
리턴 void

TileMapImage() 공개 메소드

Generates a tile map image for the automap for the current level.
public TileMapImage ( ) : Texture2D
리턴 Texture2D

TileMapImage() 공개 메소드

Generates a tile map image for the automap for the specified level.
public TileMapImage ( int LevelNo ) : Texture2D
LevelNo int Level no.
리턴 Texture2D

ValidTile() 공개 메소드

Checks to see if the tile at a specified location is within the valid game world. (eg is rendered and is not a solid). Assumes the map is positioned at 0,0,0
public ValidTile ( Vector3 location ) : bool
location Vector3 Location.
리턴 bool

current() 공개 메소드

Returns the current levels tile map info.
public current ( ) : TileInfo
리턴 TileInfo

getTileVector() 공개 메소드

Gets the vector3 at the center of the tile specified.
public getTileVector ( int tileX, int tileY ) : Vector3
tileX int Tile x.
tileY int Tile y.
리턴 Vector3

isTileOpen() 공개 메소드

Tells if the tile is one of the square open types
public isTileOpen ( int TileType ) : bool
TileType int Tile type.
리턴 bool

프로퍼티 상세

Background 공개적으로 프로퍼티

The background colour of the map.
public Color[] Background
리턴 Color[]

BorderColour 공개적으로 프로퍼티

Wall border colour.
public Color[] BorderColour
리턴 Color[]

BridgeTileColour 공개적으로 프로퍼티

The bridge tile colour.
public Color[] BridgeTileColour
리턴 Color[]

GlobalCeilingHeight 공개적으로 프로퍼티

The height of the max ceiling value for this level. Only used in SHOCK moving platform.
public int GlobalCeilingHeight
리턴 int

LavaTileColour 공개적으로 프로퍼티

The lava tile colour.
public Color[] LavaTileColour
리턴 Color[]

MapNotes 공개적으로 프로퍼티

Player written Map notes stored in a list.
public List[] MapNotes
리턴 List[]

OnGround 공개적으로 정적으로 프로퍼티

Is the player currently standing on solid ground
public static bool OnGround
리턴 bool

OnLava 공개적으로 정적으로 프로퍼티

Is the player currently standing on lava.
public static bool OnLava
리턴 bool

OnWater 공개적으로 정적으로 프로퍼티

Is the player currently standing(swimming) on water
public static bool OnWater
리턴 bool

OpenTileColour 공개적으로 프로퍼티

The open tile colour.
public Color[] OpenTileColour
리턴 Color[]

StairsTileColour 공개적으로 프로퍼티

The stairs tile colour.
public Color[] StairsTileColour
리턴 Color[]

TileSize 공개적으로 프로퍼티

The size of the tile in pixels in the map display
public int TileSize
리턴 int

Tiles 공개적으로 프로퍼티

Tile info storage class
public TileInfo[] Tiles
리턴 TileInfo[]

WaterTileColour 공개적으로 프로퍼티

The water tile colour.
public Color[] WaterTileColour
리턴 Color[]

visitTileX 공개적으로 프로퍼티

The current tile X that the player is in
public int visitTileX
리턴 int

visitTileY 공개적으로 프로퍼티

The current tile Y that the player is in.
public int visitTileY
리턴 int