C# Class CastleEscape.ScriptableMap

A map that has an associated script. Author: Dennis Honeyman
Afficher le fichier Open project: Daminvar/CastleEscape Class Usage Examples

Protected Properties

Свойство Type Description
NPEs List
game Microsoft.Xna.Framework.Game
scriptLock object
tmxMap TMXMap

Méthodes publiques

Méthode Description
ChangeMap ( Directions direction ) : bool

Changes the map by loading the correct map file for the specified direction.

GetNPEAt ( int x, int y ) : NPE

Returns the NPE at the specified location

GetRandomEncounter ( ) : Enemy
IsCollisionAt ( int x, int y ) : bool

Tests to see if there is a collision at the specified coordinates.

LoadMap ( string filename ) : void

Loads a map from a file.

ReloadMap ( ) : void

Reloads the current map.

ScriptableMap ( Microsoft.Xna.Framework.Game game ) : System

Private Methods

Méthode Description
createItemArray ( ArrayList itemArrayList ) : Item[]
js_addNPE ( NPE newNPE ) : void
js_addRandomEncounter ( Enemy enemy ) : void
js_battle ( Player player, Enemy enemy, string song ) : void
js_dialogue ( string text ) : void
js_getFlag ( string flag ) : bool
js_newEnemy ( string textureName, string enemyName, double health, double attack, double defense, double speed, double exp, ArrayList items ) : Enemy
js_newItem ( string itemName, string description, double healthBonus, double manaBonus, double cost ) : Item
js_newNPE ( ) : NPE
js_overworldMusic ( string song ) : void
js_randomBattleMusic ( string song ) : void
js_save ( Player player ) : void
js_setBattleTexture ( string textureName ) : void
js_setEastMapfile ( string filename ) : void
js_setFlag ( string flag ) : void
js_setMapName ( string name ) : void
js_setNorthMapfile ( string filename ) : void
js_setSouthMapfile ( string filename ) : void
js_setTmxMapfile ( string filename ) : void
js_setWestMapfile ( string filename ) : void
js_store ( Player player, ArrayList itemsArrayList ) : void
js_win ( ) : void
loadMapAndScript ( string filename ) : void
parseScriptFile ( string filename ) : void

Method Details

ChangeMap() public méthode

Changes the map by loading the correct map file for the specified direction.
public ChangeMap ( Directions direction ) : bool
direction Directions The direction to use
Résultat bool

GetNPEAt() public méthode

Returns the NPE at the specified location
public GetNPEAt ( int x, int y ) : NPE
x int
y int
Résultat NPE

GetRandomEncounter() public méthode

public GetRandomEncounter ( ) : Enemy
Résultat Enemy

IsCollisionAt() public méthode

Tests to see if there is a collision at the specified coordinates.
public IsCollisionAt ( int x, int y ) : bool
x int
y int
Résultat bool

LoadMap() public méthode

Loads a map from a file.
public LoadMap ( string filename ) : void
filename string The filename
Résultat void

ReloadMap() public méthode

Reloads the current map.
public ReloadMap ( ) : void
Résultat void

ScriptableMap() public méthode

public ScriptableMap ( Microsoft.Xna.Framework.Game game ) : System
game Microsoft.Xna.Framework.Game
Résultat System

Property Details

NPEs protected_oe property

protected List NPEs
Résultat List

game protected_oe property

protected Game,Microsoft.Xna.Framework game
Résultat Microsoft.Xna.Framework.Game

scriptLock protected_oe property

protected object scriptLock
Résultat object

tmxMap protected_oe property

protected TMXMap,CastleEscape tmxMap
Résultat TMXMap