GameMode Class

From Heroes of Hammerwatch wiki
Revision as of 14:28, 19 June 2019 by Miss (talk | contribs) (Created page with "Gamemode classes are defined using the <code>[GameMode]</code> metadata: [GameMode] class TestLevel : Campaign The only possible parameter for this is <code>default</code>...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Gamemode classes are defined using the [GameMode] metadata:

[GameMode]
class TestLevel : Campaign

The only possible parameter for this is default, which, if specified, causes the gamemode to load as the default gamemode if a level does not set a gamemode. In Heroes of Hammerwatch, this is always MainMenu.

Methods called from the engine

The engine calls the following functions, if they exist:

  • void Start(uint8, SValue@, StartMode)
  • void LobbyCreated(bool loadingSave)
  • void LobbyInviteAccepted(uint64 id)
  • void LobbyEntered()
  • void LobbyFailedJoin(bool host)
  • void GetPlayerSave(uint8)
  • void AddPlayer(uint8)
  • void RemovePlayer(uint8, bool)
  • void UpdateFrame(int, GameInput&, MenuInput&)
  • void UpdatePausedFrame(int, GameInput&, MenuInput&)
  • void PreRenderFrame(int)
  • void RenderFrame(int, SpriteBatch&)
  • void RenderFrameLoading(int, SpriteBatch&)
  • void ResizeWindow(int, int, float)
  • SValue@ Save()
  • void OnBindingInput(ControllerType, int)
  • void SystemMessage(string, SValue@)
  • void ChatMessage(uint8, string)
  • void LobbyDataUpdate()
  • void LobbyMemberDataUpdate(uint8)
  • void LobbyList(array<uint64>@)
  • void SetMenuState(MenuState)
  • bool MenuBack()
  • void ShowMessage(MenuMessage)
  • vec2 GetCameraPos(int)
  • vec4 GetVignette(int)
  • void Paused(bool)
  • void Generate(SValue@)
  • void OnExitGame()