C# Class Megatile, tf_client

Inheritance: System.Object
Show file Open project: wids-eria/tf_client

Public Methods

Method Description
ConvertPointToExactMegatileCoordinate ( Vector3 p ) : Vector3

Converts the supplied position to an exact megatile coordinate (e.g., in the tile's lower left corner).

Note that this point is in the client's space, and may still need to be converted to a server coordinate if it is used to post data.

ConvertPointToMegatileCenter ( Vector3 point ) : Vector3

Converts the point to megatile center.

Megatile ( ) : UnityEngine

Initializes a new instance of the Megatile class.

Megatile ( int x, int z ) : UnityEngine

Initializes a new instance of the Megatile class.

TODO: This needs to be destroyed

SetMegatileSize ( int val ) : void

Sets the size of the megatile.

ToClientZ ( int y ) : int

Convert y coordinate to a z coordinate for the client, which starts from lower left

ToServerY ( int z ) : int

Convert z coordinate to a y coordinate for the server, which starts from upper left

Method Details

ConvertPointToExactMegatileCoordinate() public static method

Converts the supplied position to an exact megatile coordinate (e.g., in the tile's lower left corner).
Note that this point is in the client's space, and may still need to be converted to a server coordinate if it is used to post data.
public static ConvertPointToExactMegatileCoordinate ( Vector3 p ) : Vector3
p Vector3 /// A point in world space. ///
return Vector3

ConvertPointToMegatileCenter() public static method

Converts the point to megatile center.
public static ConvertPointToMegatileCenter ( Vector3 point ) : Vector3
point Vector3 /// A point in world space. ///
return Vector3

Megatile() public method

Initializes a new instance of the Megatile class.
public Megatile ( ) : UnityEngine
return UnityEngine

Megatile() public method

Initializes a new instance of the Megatile class.
TODO: This needs to be destroyed
public Megatile ( int x, int z ) : UnityEngine
x int /// X. ///
z int /// Z. ///
return UnityEngine

SetMegatileSize() public static method

Sets the size of the megatile.
public static SetMegatileSize ( int val ) : void
val int /// Value. ///
return void

ToClientZ() public static method

Convert y coordinate to a z coordinate for the client, which starts from lower left
public static ToClientZ ( int y ) : int
y int /// A ///
return int

ToServerY() public static method

Convert z coordinate to a y coordinate for the server, which starts from upper left
public static ToServerY ( int z ) : int
z int /// A ///
return int