C# Class ManicDigger.MapUtil

Exibir arquivo Open project: henon/manic_digger Class Usage Examples

Public Methods

Method Description
BlocksAround ( Vector3 pos ) : IEnumerable
FromMapPos ( ulong v ) : Vector3i
Index2d ( int x, int y, int sizex ) : int
Index3d ( int x, int y, int h, int sizex, int sizey ) : int
IsSolidChunk ( byte chunk ) : bool
IsValidChunkPos ( IMapStorage map, int cx, int cy, int cz, int chunksize ) : bool
IsValidPos ( IMapStorage map, int x, int y, int z ) : bool
PlayerArea ( int playerAreaSize, int centerAreaSize, Vector3i blockPosition ) : Point
PlayerCenterArea ( int playerAreaSize, int centerAreaSize, Vector3i blockPosition ) : Point
Pos ( int index, int sizex, int sizey ) : Vector3i
SearchColumn ( IMapStorage map, int x, int y, int id ) : int
SearchColumn ( IMapStorage map, int x, int y, int id, int startH ) : int
ToFlatMap ( byte map ) : byte[]
ToMapPos ( int x, int y, int z ) : ulong
blockheight ( IMapStorage map, int tileidempty, int x, int y ) : int

Method Details

BlocksAround() public static method

public static BlocksAround ( Vector3 pos ) : IEnumerable
pos Vector3
return IEnumerable

FromMapPos() public static method

public static FromMapPos ( ulong v ) : Vector3i
v ulong
return Vector3i

Index2d() public static method

public static Index2d ( int x, int y, int sizex ) : int
x int
y int
sizex int
return int

Index3d() public static method

public static Index3d ( int x, int y, int h, int sizex, int sizey ) : int
x int
y int
h int
sizex int
sizey int
return int

IsSolidChunk() public static method

public static IsSolidChunk ( byte chunk ) : bool
chunk byte
return bool

IsValidChunkPos() public static method

public static IsValidChunkPos ( IMapStorage map, int cx, int cy, int cz, int chunksize ) : bool
map IMapStorage
cx int
cy int
cz int
chunksize int
return bool

IsValidPos() public static method

public static IsValidPos ( IMapStorage map, int x, int y, int z ) : bool
map IMapStorage
x int
y int
z int
return bool

PlayerArea() public static method

public static PlayerArea ( int playerAreaSize, int centerAreaSize, Vector3i blockPosition ) : Point
playerAreaSize int
centerAreaSize int
blockPosition Vector3i
return Point

PlayerCenterArea() public static method

public static PlayerCenterArea ( int playerAreaSize, int centerAreaSize, Vector3i blockPosition ) : Point
playerAreaSize int
centerAreaSize int
blockPosition Vector3i
return Point

Pos() public static method

public static Pos ( int index, int sizex, int sizey ) : Vector3i
index int
sizex int
sizey int
return Vector3i

SearchColumn() public static method

public static SearchColumn ( IMapStorage map, int x, int y, int id ) : int
map IMapStorage
x int
y int
id int
return int

SearchColumn() public static method

public static SearchColumn ( IMapStorage map, int x, int y, int id, int startH ) : int
map IMapStorage
x int
y int
id int
startH int
return int

ToFlatMap() public static method

public static ToFlatMap ( byte map ) : byte[]
map byte
return byte[]

ToMapPos() public static method

public static ToMapPos ( int x, int y, int z ) : ulong
x int
y int
z int
return ulong

blockheight() public static method

public static blockheight ( IMapStorage map, int tileidempty, int x, int y ) : int
map IMapStorage
tileidempty int
x int
y int
return int