C# Class TerrainManager, tf_client

Inheritance: MonoBehaviour
Afficher le fichier Open project: wids-eria/tf_client Class Usage Examples

Méthodes publiques

Свойство Type Description
buildHousingAction PlayerActionBuildHousing
forceTileUpdate bool
lastUpdateTime System.DateTime
worldRegion Region

Protected Properties

Свойство Type Description
cameraWaitTime float
downloadTilesCoroutine DownloadTilesInRegionCoroutine
updateRegion bool

Private Properties

Свойство Type Description
ClearAllTerrainObjects void
ClearBuildingsInRegion void
ClearTerrain void
ClearTreesInRegion void
CreatePaddingMeshes void
InitializeResourceTileCache void
InitializeTerrain void
UpdatePaddingMeshGridOffset void

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
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.

Method Details

Awake() public méthode

Initialize singleton
public Awake ( ) : void
Résultat void

GetResourceTileCacheAtWorldPosition() public static méthode

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. ///
Résultat bool

GetResourceTileCacheGroup() public static méthode

public static GetResourceTileCacheGroup ( Status, &status ) : ResourceTileLite[],
status Status,
Résultat ResourceTileLite[],

GetResourceTileCacheRegion() public static méthode

public static GetResourceTileCacheRegion ( Region, region ) : ].ResourceTileLite[
region Region,
Résultat ].ResourceTileLite[

GetResourceTileCacheUnderMouseCursor() public static méthode

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

GetResourceTileCacheWithId() public static méthode

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. ///
Résultat ResourceTileLite,

GetWorldCoordinateAtMousePosition() public static méthode

Gets the world coordinate at mouse position.
public static GetWorldCoordinateAtMousePosition ( ) : Vector3
Résultat Vector3

MoveTerrainToCenterOfView() public méthode

Moves the terrain to center of view.
public MoveTerrainToCenterOfView ( ) : void
Résultat void

OnGUI() public méthode

Debug GUI
public OnGUI ( ) : void
Résultat void

RefreshFromIds() public méthode

public RefreshFromIds ( ) : void
Résultat void

SetPermissions() public méthode

Sets the permissions.
public SetPermissions ( ResourceTile, tiles ) : void
tiles ResourceTile, /// Tiles from which to read permissions. ///
Résultat void

SetTerrainFromResourceTiles() public méthode

Sets the terrain from resourceTiles.
public SetTerrainFromResourceTiles ( ResourceTile, resourceTiles, SetTerrainMode mode ) : void
resourceTiles ResourceTile, /// Microtiles. ///
mode SetTerrainMode /// Mode. ///
Résultat void

Start() public méthode

Initialize terrain etc
public Start ( ) : void
Résultat void

Update() public méthode

public Update ( ) : void
Résultat void

_CameraMoved() public méthode

Respond to camera moving
public _CameraMoved ( MessageCameraMoved msg ) : void
msg MessageCameraMoved /// A ///
Résultat void

_CameraStopped() public méthode

Load the terrain when the camera stops
public _CameraStopped ( MessageCameraStopped msg ) : void
msg MessageCameraStopped /// A ///
Résultat void

_LoadedNewTiles() public méthode

public _LoadedNewTiles ( MessageLoadedNewTiles msg ) : void
msg MessageLoadedNewTiles
Résultat void

_WorldLoaded() public méthode

Mark the world loaded
public _WorldLoaded ( MessageWorldLoaded msg ) : void
msg MessageWorldLoaded /// A ///
Résultat void

Property Details

buildHousingAction public_oe property

The build housing action.
public PlayerActionBuildHousing buildHousingAction
Résultat PlayerActionBuildHousing

cameraWaitTime protected_oe property

protected float cameraWaitTime
Résultat float

downloadTilesCoroutine protected_oe property

protected DownloadTilesInRegionCoroutine downloadTilesCoroutine
Résultat DownloadTilesInRegionCoroutine

forceTileUpdate public_oe property

public bool forceTileUpdate
Résultat bool

lastUpdateTime public_oe property

Raises the loaded new tiles event and resets the refresh timer
public System.DateTime lastUpdateTime
Résultat System.DateTime

updateRegion protected_oe property

protected bool updateRegion
Résultat bool

worldRegion public_oe static_oe property

The world region.
public static Region worldRegion
Résultat Region