This page has been translated automatically.
编程
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

MasterGame类

警告
Game Framework is deprecated and no longer supported. We can't guarantee the stable work of the framework.

MasterGame类用来控制框架和游戏自身。 通过该类可加载和重新加载关卡。

MasterGame类的实现存放在路径下文件data/framework/game/master_game.h中。

MasterGame Class

成员


MasterGame()

构造函数。 用来创建新MasterGame类的实例。

参数

    update()

    其作用是在游戏关卡间切换。 您可通过按组合键CTRL + number来切换关卡,其中的number可取0到9间的值。
    注意
    该函数仅在游戏开发期间是有用。

    shutdown()

    其作用是停止MasterGame类的运行。

    getNumLevels()

    其作用是返回游戏关卡的数量。

    loadLevel()

    其作用是加载关卡。

    参数

      getActiveLevelIndex()

      其作用是返回已加载游戏的关卡索引(index) 。

      getActiveLevelName()

      其作用是返回已加载游戏的关卡名称。

      setGameParameter()

      Sets a game custom参数。

      参数

        getGameParameter()

        其作用是返回自定义参数值。

        参数

          getGameParameter()

          其作用是返回参数值。

          参数

            isGameParameter()

            其作用是返回一个可用来指明游戏参数是否存在的值。

            参数

              最新更新: 2017-10-20
              Build: ()