C# Класс ResourceTile, tf_client

Наследование: MapObject
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
idMegatile int
idOwner int
oneHalfTreeSizeClassCount int

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
SetTreeDistributionFrequency ( int index, int frequency ) : void

Sets the tree distribution frequency at index.

Описание методов

Contains() публичный Метод

Determine whether the microtile contains the specified point
public Contains ( Vector3 p ) : bool
p Vector3 /// A ///
Результат bool

GetCenterPoint() публичный Метод

Get the center point in world space
public GetCenterPoint ( ) : Vector3
Результат Vector3

GetSimpleCenterPoint() публичный Метод

Gets the simple center point.
Ignores height
public GetSimpleCenterPoint ( ) : Vector3
Результат Vector3

GetTreeCountsByGraphicType() публичный Метод

Gets the number of trees represented by each type of TreeGraphic.
public GetTreeCountsByGraphicType ( ) : int[]
Результат int[]

ToClientZ() публичный статический Метод

Convert y coordinate to a z coordinate for the client, which starts from lower left
public static ToClientZ ( int y ) : int
y int /// A ///
Результат int

ToServerY() публичный статический Метод

Convert z coordinate to a y coordinate for the server, which starts from upper left
public static ToServerY ( int z ) : int
z int /// A ///
Результат int

ToString() публичный Метод

Returns a System.String that represents the current ResourceTile.
public ToString ( ) : string
Результат string

Описание свойств

idMegatile публичное свойство

public int idMegatile
Результат int

idOwner публичное свойство

public int idOwner
Результат int

oneHalfTreeSizeClassCount публичное статическое свойство

One half the tree size class count.
This is used to avoid having to divide by two.
public static int oneHalfTreeSizeClassCount
Результат int