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
                );
        }
示例#3
0
 /// <summary>
 /// Clears the current user input.
 /// C# wrapper around web code.
 /// </summary>
 public void ClearChatInput()
 {
     WebLayer.CallJavascriptFunctionAsync("ClearChatInput");
 }
示例#4
0
 /// <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);
 }