C# Class Pokemon3D.GameModes.GameMode

Contains methods and members that control a GameMode, a collection of maps, scripts and assets.
Inheritance: Pokemon3D.Common.GameContextObject, IDataModelContainer, IDisposable
显示文件 Open project: nilllzz/Pokemon3D Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

Frees all resources consumed by this GameMode.

EnsureExecutedInMainThread ( System.Action action ) : void
GetAbilityModel ( string id ) : AbilityModel
GetItemModel ( string id ) : ItemModel
GetMapFilePath ( string mapId ) : string

Returns the path to a map file, relative to the GameMode's root folder.

GetMapFragmentFilePath ( string mapFragmentId ) : string

Returns the path to a map fragment file, relative to the GameMode's root folder.

GetModel ( string filePath ) : ModelMesh[]
GetMoveModel ( string id ) : MoveModel
GetNatureModel ( string natureId ) : NatureModel
GetNatures ( ) : NatureModel[]
GetPokedexModel ( string id ) : PokedexModel
GetPokemonFilePath ( string pokemonId ) : string

Returns the absolute path to a pokemon data file.

GetPokemonTexturesContentPath ( ) : string
GetPrimitiveMesh ( string primitiveName ) : Mesh
GetScriptFilePath ( string scriptFileName ) : string

Returns the path to a script file, relative to the GameMode's root folder.

GetTexture ( string filePath ) : Microsoft.Xna.Framework.Graphics.Texture2D
GetTextureFromRawFolder ( string filePath ) : Microsoft.Xna.Framework.Graphics.Texture2D
GetTypeModel ( string typeId ) : TypeModel
LoadMap ( string dataPath, bool forceReloadCached = false ) : MapModel
Preload ( ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
GameMode ( GameModeInfo gameModeInfo, GameContext gameContext, FileProvider fileLoader ) : Pokemon3D.DataModel

Creates an instance of the GameMode class and loads the data model.

Method Details

Dispose() public method

Frees all resources consumed by this GameMode.
public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

EnsureExecutedInMainThread() public method

public EnsureExecutedInMainThread ( System.Action action ) : void
action System.Action
return void

GetAbilityModel() public method

public GetAbilityModel ( string id ) : AbilityModel
id string
return AbilityModel

GetItemModel() public method

public GetItemModel ( string id ) : ItemModel
id string
return ItemModel

GetMapFilePath() public method

Returns the path to a map file, relative to the GameMode's root folder.
public GetMapFilePath ( string mapId ) : string
mapId string
return string

GetMapFragmentFilePath() public method

Returns the path to a map fragment file, relative to the GameMode's root folder.
public GetMapFragmentFilePath ( string mapFragmentId ) : string
mapFragmentId string
return string

GetModel() public method

public GetModel ( string filePath ) : ModelMesh[]
filePath string
return ModelMesh[]

GetMoveModel() public method

public GetMoveModel ( string id ) : MoveModel
id string
return MoveModel

GetNatureModel() public method

public GetNatureModel ( string natureId ) : NatureModel
natureId string
return NatureModel

GetNatures() public method

public GetNatures ( ) : NatureModel[]
return NatureModel[]

GetPokedexModel() public method

public GetPokedexModel ( string id ) : PokedexModel
id string
return PokedexModel

GetPokemonFilePath() public method

Returns the absolute path to a pokemon data file.
public GetPokemonFilePath ( string pokemonId ) : string
pokemonId string
return string

GetPokemonTexturesContentPath() public method

public GetPokemonTexturesContentPath ( ) : string
return string

GetPrimitiveMesh() public method

public GetPrimitiveMesh ( string primitiveName ) : Mesh
primitiveName string
return Pokemon3D.Rendering.Data.Mesh

GetScriptFilePath() public method

Returns the path to a script file, relative to the GameMode's root folder.
public GetScriptFilePath ( string scriptFileName ) : string
scriptFileName string
return string

GetTexture() public method

public GetTexture ( string filePath ) : Microsoft.Xna.Framework.Graphics.Texture2D
filePath string
return Microsoft.Xna.Framework.Graphics.Texture2D

GetTextureFromRawFolder() public method

public GetTextureFromRawFolder ( string filePath ) : Microsoft.Xna.Framework.Graphics.Texture2D
filePath string
return Microsoft.Xna.Framework.Graphics.Texture2D

GetTypeModel() public method

public GetTypeModel ( string typeId ) : TypeModel
typeId string
return TypeModel

LoadMap() public method

public LoadMap ( string dataPath, bool forceReloadCached = false ) : MapModel
dataPath string
forceReloadCached bool
return MapModel

Preload() public method

public Preload ( ) : void
return void