GameStateMenu

Interactions with the menu game state and all the functionality for starting/ending a game

Summary
GameStateMenuInteractions with the menu game state and all the functionality for starting/ending a game
Functions
NKCalculateSeedCalculate the game seed number from a given string
NKSetGenerationSeedSet the seed to use in generation when the next world is started.
NKStartSingleStart the game in single player mode (same as NKStartServer, but ports, max players and allowed connections are set automatically
NKStartServerStart the game as a server host
NKStartClientStart the game as a remote client
NKSetGeneratorSet the generator to be used for the world
NKSetGameModeSet the game mode
NKSetMultiplayerMenuCallbacksSet callbacks to be used when successfully launching a server or client to know if it was successful or an error occurred.
NKEndGameUsed to end the game from anywhere.
NKSetViewDistanceSet the view distance to be used when generating the next world

Functions

NKCalculateSeed

Calculate the game seed number from a given string

Parameters

stringThe string to convert

Returns

intThe number representing the given seed string

NKSetGenerationSeed

Set the seed to use in generation when the next world is started.

Parameters

intThe seed number

NKStartSingle

Start the game in single player mode (same as NKStartServer, but ports, max players and allowed connections are set automatically

Parameters

stringThe name of the world

NKStartServer

Start the game as a server host

Parameters

stringThe name of the world

NKStartClient

Start the game as a remote client

Parameters

stringThe name of the world

NKSetGenerator

Set the generator to be used for the world

Parameters

stringThe name of the generator

NKSetGameMode

Set the game mode

Parameters

stringThe name of the generator

NKSetMultiplayerMenuCallbacks

Set callbacks to be used when successfully launching a server or client to know if it was successful or an error occurred.

Parameters

stringThe function to be called back when a successful attempt was made
stringThe function to be called back when a error occurred attempting to connect

NKEndGame

Used to end the game from anywhere.  This will handle all disconnections, resets and proper cleanup of the current world.

NKSetViewDistance

Set the view distance to be used when generating the next world

Parameters

intThe view distance in cells
Close