public void SwitchActiveState(UIStateManagerContainer container) { if (!WebLayer.IsLoaded) { return; } var stateJson = LowercaseContractResolver.SerializeObject(container); WebLayer.CallJavascriptFunctionAsync("SwitchActiveState", stateJson); }
public override void Update(IGameTimeService gameTime) { ViewModel.Update(gameTime); _gameUserInterface.Update(gameTime); if (!IsLoaded) { return; } var interfaceJson = LowercaseContractResolver.SerializeObject(ViewModel.CurrentGlobalGameInterfaceState); WebLayer.CallJavascriptFunctionAsync( "UpdateGameInterface", interfaceJson ); }
/// <summary> /// Clears the current user input. /// C# wrapper around web code. /// </summary> public void ClearChatInput() { WebLayer.CallJavascriptFunctionAsync("ClearChatInput"); }
/// <summary> /// Adds a chat. /// C# wrapper around web code. /// </summary> /// <param name="chatJson">The chat json.</param> public void AddChat(string chatJson) { WebLayer.CallJavascriptFunctionAsync("AddChat", chatJson); }
public void SetChatHistory(string chats) { WebLayer.CallJavascriptFunctionAsync("UpdateChatbox", chats); }