C# Class ResourceTile, tf_client

Inheritance: MapObject
Datei anzeigen Open project: wids-eria/tf_client Class Usage Examples

Public Properties

Property Type Description
idMegatile int
idOwner int
oneHalfTreeSizeClassCount int

Public Methods

Method Description
Contains ( Vector3 p ) : bool

Determine whether the microtile contains the specified point

GetCenterPoint ( ) : Vector3

Get the center point in world space

GetSimpleCenterPoint ( ) : Vector3

Gets the simple center point.

Ignores height

GetTreeCountsByGraphicType ( ) : int[]

Gets the number of trees represented by each type of TreeGraphic.

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

ToString ( ) : string

Returns a System.String that represents the current ResourceTile.

Private Methods

Method Description
SetTreeDistributionFrequency ( int index, int frequency ) : void

Sets the tree distribution frequency at index.

Method Details

Contains() public method

Determine whether the microtile contains the specified point
public Contains ( Vector3 p ) : bool
p Vector3 /// A ///
return bool

GetCenterPoint() public method

Get the center point in world space
public GetCenterPoint ( ) : Vector3
return Vector3

GetSimpleCenterPoint() public method

Gets the simple center point.
Ignores height
public GetSimpleCenterPoint ( ) : Vector3
return Vector3

GetTreeCountsByGraphicType() public method

Gets the number of trees represented by each type of TreeGraphic.
public GetTreeCountsByGraphicType ( ) : int[]
return int[]

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

ToString() public method

Returns a System.String that represents the current ResourceTile.
public ToString ( ) : string
return string

Property Details

idMegatile public_oe property

public int idMegatile
return int

idOwner public_oe property

public int idOwner
return int

oneHalfTreeSizeClassCount public_oe static_oe property

One half the tree size class count.
This is used to avoid having to divide by two.
public static int oneHalfTreeSizeClassCount
return int