This page has been translated automatically.
Programming
Fundamentials
Setting Up Development Environment
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Core Library
Containers
Engine Classes
Node-Related Classes
Rendering-Related Classes
Physics-Related Classes
Bounds-Related Classes
GUI-Related Classes
Controls-Related Classes
Pathfinding-Related Classes
Utility Classes
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Game Namespace

The following functions are implemented in the Game namespace (can be found in the data/framework/game/game_system.h file).

void Game::init ()

Initializes a system framework: parses CLIs, defines a path to the *.game file, generates a MasterGame class and loads the level.

void Game::update ()

Updates a system framework.

void Game::shutdown ()

Releases framework resources.

string Game::getGamePath ()

Returns a path to the loaded game file.

Return value

Path to the loaded game file.

int Game::getActiveLevelIndex ()

Returns a level index of the loaded game.

Return value

Level index.

string Game::getActiveLevelName ()

Returns a level name of the loaded game.

Return value

Level name.

void Game::loadLevel (int index)

Loads a level.

Arguments

  • int index - Level index if index is an integer; level name if index is a string.

void Game::setGameParameter (string name, variable value)

Sets a game custom parameter.

Arguments

  • string name - Unique parameter name.
  • variable value - Parameter value. The value can be the following types: int, float, double, vec3, vec4, string.

variable Game::getGameParameter (string name)

Returns a custom parameter value.

Arguments

  • string name - Parameter name.

Return value

Custom parameter value if it is found; otherwise 0.

int Game::isGameParameter (string name)

Returns a value indicating if the game parameter exists.

Arguments

  • string name - Parameter name.

Return value

1 if the parameter exists; otherwise 0.
Last update: 03.07.2017
Build: ()