C# 클래스 PlayerActionHarvestTimber, tf_client

An action for enacting a harvesting strategy on a section of land.
상속: PlayerAction
파일 보기 프로젝트 열기: wids-eria/tf_client

공개 프로퍼티들

프로퍼티 타입 설명
timeToWaitForRefresh float

보호된 프로퍼티들

프로퍼티 타입 설명
m_actualFrequencyDistributionOfSelectedTiles int[]
m_cutType CutType
m_desiredTreeValues int[]
m_histogramHeight float
m_histogramRect Rect
m_knownFrequencyDistributionOfSelectedTiles int[]
m_needSurveyMessageRect Rect

공개 메소드들

메소드 설명
DisplayHistogram ( int treesToKeep, int treesToCut, float progress ) : void

Displays the histogram.

Presently, implicitly assumes that both arrays have length of ResourceTile.treeSizeClassCount and that all values are >= 0. KNOW YOUR DATA BRO.

DoIt ( object selection ) : void

Configure modifications then call base implementation.

IsPermittedOnResourceTile ( ResourceTile, tile ) : bool

Determines whether this action is permitted on the specified tile.

OnEnable ( ) : void

Raises the enable event.

보호된 메소드들

메소드 설명
Awake ( ) : void

Listen for input messages.

DisplayControlsContents ( ) : void

Displays the controls contents.

DisplayCutSelector ( ) : void

Displays the cut selector.

DisplayOperationCost ( ) : void

Displays the operation cost.

FilterSelection ( ResourceTileSelection, selection ) : ResourceTileSelection,

HACK

SendActionMessage ( ResourceTile, modifiedTiles ) : void
SubmitResourceTileSelectionToServerAPI ( ResourceTileSelection, selection ) : IEnumerator

Submits the resource tile selection to server API.

This differs from the base implementation because the API returns timber values, not modified resource tiles

Update ( ) : void

Refresh the info for the selection as needed.

비공개 메소드들

메소드 설명
ClearFrequencyDistribution ( ) : void

Clears the frequency distribution.

ComputeTreesToBeCut ( int &treesToCut, int &treesToKeep ) : void

Computes the trees to be cut.

ComputeTreesToBeCut ( int frequencyDistribution, int &treesToCut, int &treesToKeep ) : void

Computes the trees to be cut (Overload function).

InitializeQRatioCurve ( ) : void

Initializes the Q ratio curve.

RefreshDataForSelection ( ResourceTileSelection, selection ) : IEnumerator

Refreshs the data for selection.

Start ( ) : void

Initialize q ratio curve.

메소드 상세

Awake() 보호된 메소드

Listen for input messages.
protected Awake ( ) : void
리턴 void

DisplayControlsContents() 보호된 메소드

Displays the controls contents.
protected DisplayControlsContents ( ) : void
리턴 void

DisplayCutSelector() 보호된 메소드

Displays the cut selector.
protected DisplayCutSelector ( ) : void
리턴 void

DisplayHistogram() 공개 정적인 메소드

Displays the histogram.
Presently, implicitly assumes that both arrays have length of ResourceTile.treeSizeClassCount and that all values are >= 0. KNOW YOUR DATA BRO.
public static DisplayHistogram ( int treesToKeep, int treesToCut, float progress ) : void
treesToKeep int /// Trees to keep. ///
treesToCut int /// Trees to cut. ///
progress float /// Normalized progress. ///
리턴 void

DisplayOperationCost() 보호된 메소드

Displays the operation cost.
protected DisplayOperationCost ( ) : void
리턴 void

DoIt() 공개 메소드

Configure modifications then call base implementation.
public DoIt ( object selection ) : void
selection object /// The selection to which the action should be applied. ///
리턴 void

FilterSelection() 보호된 메소드

HACK
protected FilterSelection ( ResourceTileSelection, selection ) : ResourceTileSelection,
selection ResourceTileSelection, /// Selection. ///
리턴 ResourceTileSelection,

IsPermittedOnResourceTile() 공개 메소드

Determines whether this action is permitted on the specified tile.
public IsPermittedOnResourceTile ( ResourceTile, tile ) : bool
tile ResourceTile, /// The resource tile in question. ///
리턴 bool

OnEnable() 공개 메소드

Raises the enable event.
public OnEnable ( ) : void
리턴 void

SendActionMessage() 보호된 메소드

protected SendActionMessage ( ResourceTile, modifiedTiles ) : void
modifiedTiles ResourceTile,
리턴 void

SubmitResourceTileSelectionToServerAPI() 보호된 메소드

Submits the resource tile selection to server API.
This differs from the base implementation because the API returns timber values, not modified resource tiles
protected SubmitResourceTileSelectionToServerAPI ( ResourceTileSelection, selection ) : IEnumerator
selection ResourceTileSelection, /// The resource tile selection. ///
리턴 IEnumerator

Update() 보호된 메소드

Refresh the info for the selection as needed.
protected Update ( ) : void
리턴 void

프로퍼티 상세

m_actualFrequencyDistributionOfSelectedTiles 보호되어 있는 프로퍼티

protected int[] m_actualFrequencyDistributionOfSelectedTiles
리턴 int[]

m_cutType 보호되어 있는 프로퍼티

The type of the cut.
protected CutType m_cutType
리턴 CutType

m_desiredTreeValues 보호되어 있는 프로퍼티

The desired tree values.
This is only used in god mode, and can be discarded when it is no longer used.
protected int[] m_desiredTreeValues
리턴 int[]

m_histogramHeight 보호되어 있는 정적으로 프로퍼티

The height of the histogram.
protected static float m_histogramHeight
리턴 float

m_histogramRect 보호되어 있는 정적으로 프로퍼티

The histogram rect.
protected static Rect m_histogramRect
리턴 Rect

m_knownFrequencyDistributionOfSelectedTiles 보호되어 있는 프로퍼티

The known frequency distribution of selected tiles.
protected int[] m_knownFrequencyDistributionOfSelectedTiles
리턴 int[]

m_needSurveyMessageRect 보호되어 있는 정적으로 프로퍼티

protected static Rect m_needSurveyMessageRect
리턴 Rect

timeToWaitForRefresh 공개적으로 프로퍼티

The time to wait for refreshing data on the current select.
public float timeToWaitForRefresh
리턴 float