C# 클래스 PlayerAction, tf_client

상속: MonoBehaviour
파일 보기 프로젝트 열기: wids-eria/tf_client 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
allowPerformance bool
controlsAreaHeight float
cost int
dialogConfirmButtonDo GUIContent
dialogLongDescription string
effectPrefab GameObject
hasServerAPIPoint bool
icon UnityEngine.Texture2D
inputMode InputMode
notificationMessage string
tooltip string

보호된 프로퍼티들

프로퍼티 타입 설명
downloadTilesCoroutine DownloadTilesInRegionCoroutine
m_actionProgress float
m_tileModifications ResourceTileModification

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
DisplayControls ( ) : void

Configure the dialog

DoAction ( GUIButtonBase, button ) : void
DoIt ( object selection ) : void

Perform the action.

IsPermittedOnResourceTile ( ResourceTile, tile ) : bool

Determines whether this action is permitted on the specified tile.

OnEnable ( ) : void

Raises the enable event.

OnGUI ( ) : void

Display loading icon as needed

Start ( ) : void
UpdateMask ( ) : void

Updates the mask.

UpdateSelectionHighlighter ( ) : void

Updates the selection highlighter.

보호된 메소드들

메소드 설명
BeginGUIArea ( ) : void

Begins the GUI area.

CalculateCost ( ResourceTileLite, tiles ) : int

Calculates the cost of performing this action on the given tiles

ConcludeActionOnResourceTiles ( ResourceTileSelection, selection ) : void

Concludes the action on resource tiles.

DisplayControlsContents ( ) : void

Displays the controls contents.

DisplayPaintSelectionControlGroup ( ) : void

Displays the paint selection control group.

DoItButton ( ) : void

The button to perform the action.

DoResourceCalculations ( ResourceTileSelection, selection ) : bool
EndGUIArea ( ) : void

Ends the GUI area.

GetActionJson ( ) : string

Gets JSON representation for the action.

Creates a JSON object for use with god mode.

GetActionJson ( object mods ) : string
GetDoItWWW ( ResourceTileSelection, selection ) : WWW

Gets the do it WWW.

GetEffectSpawnLocationsFromResourceTiles ( ResourceTileSelection, selection ) : Vector3[]

Gets the effect spawn locations from resource tiles.

Put ( ResourceTileSelection, selection ) : IEnumerator

Forces a put of resource tile modifications using god mode.

This is a temporary solution for implementing actions with no server API point, and can eventually be removed.

Refresh ( ) : IEnumerator
RefreshAfterActionFailed ( string errorMessage ) : IEnumerator

Refreshs after the action failed.

SendActionMessage ( ResourceTile, modifiedTiles ) : void

Sends out a message stating that an action was performed

SpawnEffectsAtLocations ( Vector3 spawnLocations ) : void

Spawns the effects at locations.

SubmitResourceTileSelection ( ResourceTileSelection, selection ) : void

Submits the resource tile selection.

NOTE: This may need a more sophisticated implementation if e.g., player action changes before server responds.

SubmitResourceTileSelectionToServerAPI ( ResourceTileSelection, selection ) : IEnumerator

Submits the resource tile selection to server API.

메소드 상세

BeginGUIArea() 보호된 메소드

Begins the GUI area.
protected BeginGUIArea ( ) : void
리턴 void

CalculateCost() 보호된 메소드

Calculates the cost of performing this action on the given tiles
protected CalculateCost ( ResourceTileLite, tiles ) : int
tiles ResourceTileLite, /// Tiles. ///
리턴 int

ConcludeActionOnResourceTiles() 보호된 메소드

Concludes the action on resource tiles.
protected ConcludeActionOnResourceTiles ( ResourceTileSelection, selection ) : void
selection ResourceTileSelection, /// Tiles. ///
리턴 void

DisplayControls() 공개 메소드

Configure the dialog
public DisplayControls ( ) : void
리턴 void

DisplayControlsContents() 보호된 메소드

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

DisplayPaintSelectionControlGroup() 보호된 메소드

Displays the paint selection control group.
protected DisplayPaintSelectionControlGroup ( ) : void
리턴 void

DoAction() 공개 메소드

public DoAction ( GUIButtonBase, button ) : void
button GUIButtonBase,
리턴 void

DoIt() 공개 메소드

Perform the action.
public DoIt ( object selection ) : void
selection object /// The selection to which the action should be applied. ///
리턴 void

DoItButton() 보호된 메소드

The button to perform the action.
protected DoItButton ( ) : void
리턴 void

DoResourceCalculations() 보호된 메소드

protected DoResourceCalculations ( ResourceTileSelection, selection ) : bool
selection ResourceTileSelection,
리턴 bool

EndGUIArea() 보호된 메소드

Ends the GUI area.
protected EndGUIArea ( ) : void
리턴 void

GetActionJson() 보호된 메소드

Gets JSON representation for the action.
Creates a JSON object for use with god mode.
protected GetActionJson ( ) : string
리턴 string

GetActionJson() 보호된 메소드

protected GetActionJson ( object mods ) : string
mods object
리턴 string

GetDoItWWW() 보호된 메소드

Gets the do it WWW.
protected GetDoItWWW ( ResourceTileSelection, selection ) : WWW
selection ResourceTileSelection, /// The selection. ///
리턴 WWW

GetEffectSpawnLocationsFromResourceTiles() 보호된 메소드

Gets the effect spawn locations from resource tiles.
protected GetEffectSpawnLocationsFromResourceTiles ( ResourceTileSelection, selection ) : Vector3[]
selection ResourceTileSelection, /// Tiles. ///
리턴 Vector3[]

IsPermittedOnResourceTile() 공개 추상적인 메소드

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

OnEnable() 공개 메소드

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

OnGUI() 공개 메소드

Display loading icon as needed
public OnGUI ( ) : void
리턴 void

Put() 보호된 메소드

Forces a put of resource tile modifications using god mode.
This is a temporary solution for implementing actions with no server API point, and can eventually be removed.
protected Put ( ResourceTileSelection, selection ) : IEnumerator
selection ResourceTileSelection, /// The selection. ///
리턴 IEnumerator

Refresh() 보호된 메소드

protected Refresh ( ) : IEnumerator
리턴 IEnumerator

RefreshAfterActionFailed() 보호된 메소드

Refreshs after the action failed.
protected RefreshAfterActionFailed ( string errorMessage ) : IEnumerator
errorMessage string /// Error message. ///
리턴 IEnumerator

SendActionMessage() 보호된 메소드

Sends out a message stating that an action was performed
protected SendActionMessage ( ResourceTile, modifiedTiles ) : void
modifiedTiles ResourceTile,
리턴 void

SpawnEffectsAtLocations() 보호된 메소드

Spawns the effects at locations.
protected SpawnEffectsAtLocations ( Vector3 spawnLocations ) : void
spawnLocations Vector3 /// Spawn locations. ///
리턴 void

Start() 공개 메소드

public Start ( ) : void
리턴 void

SubmitResourceTileSelection() 보호된 메소드

Submits the resource tile selection.
NOTE: This may need a more sophisticated implementation if e.g., player action changes before server responds.
protected SubmitResourceTileSelection ( ResourceTileSelection, selection ) : void
selection ResourceTileSelection, /// The resource tile selection. ///
리턴 void

SubmitResourceTileSelectionToServerAPI() 보호된 메소드

Submits the resource tile selection to server API.
protected SubmitResourceTileSelectionToServerAPI ( ResourceTileSelection, selection ) : IEnumerator
selection ResourceTileSelection, /// The resource tile selection. ///
리턴 IEnumerator

UpdateMask() 공개 메소드

Updates the mask.
public UpdateMask ( ) : void
리턴 void

UpdateSelectionHighlighter() 공개 메소드

Updates the selection highlighter.
public UpdateSelectionHighlighter ( ) : void
리턴 void

프로퍼티 상세

allowPerformance 공개적으로 프로퍼티

public bool allowPerformance
리턴 bool

controlsAreaHeight 공개적으로 프로퍼티

The height of the controls area.
public float controlsAreaHeight
리턴 float

cost 공개적으로 프로퍼티

the base cost to perform the action; modify in GatherData if it is variable
public int cost
리턴 int

dialogConfirmButtonDo 공개적으로 프로퍼티

Labels to appear on the submission button.
public GUIContent dialogConfirmButtonDo
리턴 GUIContent

dialogLongDescription 공개적으로 프로퍼티

long description to appear under the question in the dialog
public string dialogLongDescription
리턴 string

downloadTilesCoroutine 보호되어 있는 프로퍼티

protected DownloadTilesInRegionCoroutine downloadTilesCoroutine
리턴 DownloadTilesInRegionCoroutine

effectPrefab 공개적으로 프로퍼티

Prefab for the special effect to spawn, if any
public GameObject effectPrefab
리턴 GameObject

hasServerAPIPoint 공개적으로 프로퍼티

Flag specifying whether or not the action has a server API point.
When this is false, the action uses a god mode implementation. It will eventually be removed once every action has an API point.
public bool hasServerAPIPoint
리턴 bool

icon 공개적으로 프로퍼티

the icon associated with this action
public Texture2D,UnityEngine icon
리턴 UnityEngine.Texture2D

inputMode 공개적으로 프로퍼티

The input mode.
public InputMode inputMode
리턴 InputMode

m_actionProgress 보호되어 있는 프로퍼티

The action progress.
protected float m_actionProgress
리턴 float

m_tileModifications 보호되어 있는 프로퍼티

The tile modifications wrapper.
protected ResourceTileModification m_tileModifications
리턴 ResourceTileModification

notificationMessage 공개적으로 프로퍼티

public string notificationMessage
리턴 string

tooltip 공개적으로 프로퍼티

description of what the action does
public string tooltip
리턴 string