C# Class GameWorldController, UnderworldExporter

Game world controller for controlling references and various global activities
Inheritance: UWEBase
Mostrar archivo Open project: hankmorgan/UnderworldExporter Class Usage Examples

Public Properties

Property Type Description
AtMainMenu bool
EnableTextureAnimation bool
InventoryMarker GameObject
LevelNo int
LevelObjects GameObject[]
StartPos Vector3
Tilemap TileMap,
WorldModel GameObject[]
commobj CommonObjProps,
critter Critters,
game string
greyScale Shader
instance GameWorldController,
mus MusicController,
objectMaster ObjectMasters,
paletteArray UnityEngine.Texture2D[]
paletteIndex int
paletteIndexReverse int
variables int[]
vortex Shader
weaponprops WeaponProps,

Public Methods

Method Description
FindTile ( int x, int y, int surface ) : GameObject

Finds the tile or wall at the specified coordinates.

FindTileByName ( string tileName ) : GameObject

Finds a tile in the current level by name

FreezeMovement ( GameObject myObj ) : void

Freezes the movement of the specified object if it has a rigid body attached.

GetTileName ( int x, int y, int surface ) : string

Gets the gameobject name for the specified tile x,y and surface. Eg Wall_02_03, Tile_22_23

LevelMarker ( ) : Transform

Returns the transform of the levels object marker. So objects will remain on that level

SwitchLevel ( int newLevelNo ) : void

Switches the level to another one. Disables the map and level objects of the old one.

UnFreezeMovement ( GameObject myObj ) : void

Unfreeze the movement of the specified object if it has a rigid body attached.

findDoor ( int x, int y ) : GameObject

inds a door in the tile pointed to by the two coordinates.

getCurrentLevelModel ( ) : GameObject

Gets the current level model.

Private Methods

Method Description
Awake ( ) : void
Start ( ) : void
UpdateAnimation ( ) : void

Updates the global shader parameter for the colorpalette shaders at set intervals. To enable texture animation

Method Details

FindTile() public static method

Finds the tile or wall at the specified coordinates.
public static FindTile ( int x, int y, int surface ) : GameObject
x int The x coordinate.
y int The y coordinate.
surface int Surface.
return GameObject

FindTileByName() public static method

Finds a tile in the current level by name
public static FindTileByName ( string tileName ) : GameObject
tileName string Tile name.
return GameObject

FreezeMovement() public static method

Freezes the movement of the specified object if it has a rigid body attached.
public static FreezeMovement ( GameObject myObj ) : void
myObj GameObject My object.
return void

GetTileName() public static method

Gets the gameobject name for the specified tile x,y and surface. Eg Wall_02_03, Tile_22_23
public static GetTileName ( int x, int y, int surface ) : string
x int The x coordinate.
y int The y coordinate.
surface int Surface.
return string

LevelMarker() public method

Returns the transform of the levels object marker. So objects will remain on that level
public LevelMarker ( ) : Transform
return Transform

SwitchLevel() public method

Switches the level to another one. Disables the map and level objects of the old one.
public SwitchLevel ( int newLevelNo ) : void
newLevelNo int New level no.
return void

UnFreezeMovement() public static method

Unfreeze the movement of the specified object if it has a rigid body attached.
public static UnFreezeMovement ( GameObject myObj ) : void
myObj GameObject My object.
return void

findDoor() public static method

inds a door in the tile pointed to by the two coordinates.
public static findDoor ( int x, int y ) : GameObject
x int The x coordinate.
y int The y coordinate.
return GameObject

getCurrentLevelModel() public method

Gets the current level model.
public getCurrentLevelModel ( ) : GameObject
return GameObject

Property Details

AtMainMenu public_oe property

Is the game at the main menu or should it start at the mainmenu.
public bool AtMainMenu
return bool

EnableTextureAnimation public_oe property

Enables texture animation effects
public bool EnableTextureAnimation
return bool

InventoryMarker public_oe property

The game object that picked up items are parented to.
public GameObject InventoryMarker
return GameObject

LevelNo public_oe property

What level number we are currently on.
public int LevelNo
return int

LevelObjects public_oe property

Array of game objects containing the level objects
public GameObject[] LevelObjects
return GameObject[]

StartPos public_oe property

public Vector3 StartPos
return Vector3

Tilemap public_oe property

The tilemap class for the game
public TileMap, Tilemap
return TileMap,

WorldModel public_oe property

Array of game objects containing the level meshes
public GameObject[] WorldModel
return GameObject[]

commobj public_oe property

Common Object Properties
public CommonObjProps, commobj
return CommonObjProps,

critter public_oe property

The critter properties from objects.dat
public Critters, critter
return Critters,

game public_oe property

The game name.
public string game
return string

greyScale public_oe property

The grey scale shader. Reference to allow loading of a hidden shader.
public Shader greyScale
return Shader

instance public_oe static_oe property

The instance of this class
public static GameWorldController, instance
return GameWorldController,

mus public_oe property

The music controller for the game
public MusicController, mus
return MusicController,

objectMaster public_oe property

The object master class for storing and reading object properties in an external file
public ObjectMasters, objectMaster
return ObjectMasters,

paletteArray public_oe property

Array of cycled game palettes for animatione effects.
public Texture2D[],UnityEngine paletteArray
return UnityEngine.Texture2D[]

paletteIndex public_oe property

The index of the palette currently in use
public int paletteIndex
return int

paletteIndexReverse public_oe property

The palette index when going in reverse.
public int paletteIndexReverse
return int

variables public_oe property

The Variables for the check/set variable traps
public int[] variables
return int[]

vortex public_oe property

The vortex effect shader. Reference to allow loading of a hidden shader.
public Shader vortex
return Shader

weaponprops public_oe property

Weapon properties.
public WeaponProps, weaponprops
return WeaponProps,