C# 클래스 TerrainManager, tf_client

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

공개 프로퍼티들

프로퍼티 타입 설명
buildHousingAction PlayerActionBuildHousing
forceTileUpdate bool
lastUpdateTime System.DateTime
worldRegion Region

보호된 프로퍼티들

프로퍼티 타입 설명
cameraWaitTime float
downloadTilesCoroutine DownloadTilesInRegionCoroutine
updateRegion bool

Private Properties

프로퍼티 타입 설명
ClearAllTerrainObjects void
ClearBuildingsInRegion void
ClearTerrain void
ClearTreesInRegion void
CreatePaddingMeshes void
InitializeResourceTileCache void
InitializeTerrain void
UpdatePaddingMeshGridOffset void

공개 메소드들

메소드 설명
Awake ( ) : void

Initialize singleton

GetResourceTileCacheAtWorldPosition ( Vector3 position, ResourceTileLite, &tile ) : bool

Gets the resource tile cache at world position.

GetResourceTileCacheGroup ( Status, &status ) : ResourceTileLite[],
GetResourceTileCacheRegion ( Region, region ) : ].ResourceTileLite[
GetResourceTileCacheUnderMouseCursor ( ResourceTileLite, &tile ) : bool

Gets the resource tile cache under mouse cursor.

GetResourceTileCacheWithId ( int id, Status, &status ) : ResourceTileLite,

Gets the resource tile cache with identifier.

GetWorldCoordinateAtMousePosition ( ) : Vector3

Gets the world coordinate at mouse position.

MoveTerrainToCenterOfView ( ) : void

Moves the terrain to center of view.

OnGUI ( ) : void

Debug GUI

RefreshFromIds ( ) : void
SetPermissions ( ResourceTile, tiles ) : void

Sets the permissions.

SetTerrainFromResourceTiles ( ResourceTile, resourceTiles, SetTerrainMode mode ) : void

Sets the terrain from resourceTiles.

Start ( ) : void

Initialize terrain etc

Update ( ) : void
_CameraMoved ( MessageCameraMoved msg ) : void

Respond to camera moving

_CameraStopped ( MessageCameraStopped msg ) : void

Load the terrain when the camera stops

_LoadedNewTiles ( MessageLoadedNewTiles msg ) : void
_WorldLoaded ( MessageWorldLoaded msg ) : void

Mark the world loaded

비공개 메소드들

메소드 설명
ClearAllTerrainObjects ( SetTerrainMode mode ) : void

Clears all terrain objects (buildings and trees).

ClearBuildingsInRegion ( Region, region ) : void

Clears the buildings in region.

ClearTerrain ( SetTerrainMode mode ) : void

Clears the terrain of all data.

ClearTreesInRegion ( Region, region, SetTerrainMode mode ) : void

Clears the trees in region.

CreatePaddingMeshes ( ) : void

Create the padding meshes to surround the terrain

InitializeResourceTileCache ( ) : void

Initializes the resource tile cache.

InitializeTerrain ( ) : void

Initialize the terrain and collider

UpdatePaddingMeshGridOffset ( ) : void

Updates the padding mesh grid offset.

메소드 상세

Awake() 공개 메소드

Initialize singleton
public Awake ( ) : void
리턴 void

GetResourceTileCacheAtWorldPosition() 공개 정적인 메소드

Gets the resource tile cache at world position.
public static GetResourceTileCacheAtWorldPosition ( Vector3 position, ResourceTileLite, &tile ) : bool
position Vector3
tile ResourceTileLite, /// The cache at the specified position. ///
리턴 bool

GetResourceTileCacheGroup() 공개 정적인 메소드

public static GetResourceTileCacheGroup ( Status, &status ) : ResourceTileLite[],
status Status,
리턴 ResourceTileLite[],

GetResourceTileCacheRegion() 공개 정적인 메소드

public static GetResourceTileCacheRegion ( Region, region ) : ].ResourceTileLite[
region Region,
리턴 ].ResourceTileLite[

GetResourceTileCacheUnderMouseCursor() 공개 정적인 메소드

Gets the resource tile cache under mouse cursor.
public static GetResourceTileCacheUnderMouseCursor ( ResourceTileLite, &tile ) : bool
tile ResourceTileLite, /// The cache under the mouse cursor. ///
리턴 bool

GetResourceTileCacheWithId() 공개 정적인 메소드

Gets the resource tile cache with identifier.
public static GetResourceTileCacheWithId ( int id, Status, &status ) : ResourceTileLite,
id int /// Identifier. ///
status Status, /// Status indicating whether the returned value is valid or not. ///
리턴 ResourceTileLite,

GetWorldCoordinateAtMousePosition() 공개 정적인 메소드

Gets the world coordinate at mouse position.
public static GetWorldCoordinateAtMousePosition ( ) : Vector3
리턴 Vector3

MoveTerrainToCenterOfView() 공개 메소드

Moves the terrain to center of view.
public MoveTerrainToCenterOfView ( ) : void
리턴 void

OnGUI() 공개 메소드

Debug GUI
public OnGUI ( ) : void
리턴 void

RefreshFromIds() 공개 메소드

public RefreshFromIds ( ) : void
리턴 void

SetPermissions() 공개 메소드

Sets the permissions.
public SetPermissions ( ResourceTile, tiles ) : void
tiles ResourceTile, /// Tiles from which to read permissions. ///
리턴 void

SetTerrainFromResourceTiles() 공개 메소드

Sets the terrain from resourceTiles.
public SetTerrainFromResourceTiles ( ResourceTile, resourceTiles, SetTerrainMode mode ) : void
resourceTiles ResourceTile, /// Microtiles. ///
mode SetTerrainMode /// Mode. ///
리턴 void

Start() 공개 메소드

Initialize terrain etc
public Start ( ) : void
리턴 void

Update() 공개 메소드

public Update ( ) : void
리턴 void

_CameraMoved() 공개 메소드

Respond to camera moving
public _CameraMoved ( MessageCameraMoved msg ) : void
msg MessageCameraMoved /// A ///
리턴 void

_CameraStopped() 공개 메소드

Load the terrain when the camera stops
public _CameraStopped ( MessageCameraStopped msg ) : void
msg MessageCameraStopped /// A ///
리턴 void

_LoadedNewTiles() 공개 메소드

public _LoadedNewTiles ( MessageLoadedNewTiles msg ) : void
msg MessageLoadedNewTiles
리턴 void

_WorldLoaded() 공개 메소드

Mark the world loaded
public _WorldLoaded ( MessageWorldLoaded msg ) : void
msg MessageWorldLoaded /// A ///
리턴 void

프로퍼티 상세

buildHousingAction 공개적으로 프로퍼티

The build housing action.
public PlayerActionBuildHousing buildHousingAction
리턴 PlayerActionBuildHousing

cameraWaitTime 보호되어 있는 프로퍼티

protected float cameraWaitTime
리턴 float

downloadTilesCoroutine 보호되어 있는 프로퍼티

protected DownloadTilesInRegionCoroutine downloadTilesCoroutine
리턴 DownloadTilesInRegionCoroutine

forceTileUpdate 공개적으로 프로퍼티

public bool forceTileUpdate
리턴 bool

lastUpdateTime 공개적으로 프로퍼티

Raises the loaded new tiles event and resets the refresh timer
public System.DateTime lastUpdateTime
리턴 System.DateTime

updateRegion 보호되어 있는 프로퍼티

protected bool updateRegion
리턴 bool

worldRegion 공개적으로 정적으로 프로퍼티

The world region.
public static Region worldRegion
리턴 Region