public override async Task OnClick() { try { switch (Type) { case PanelChangerButtonType.Open: await PanelChangerService.ShowPanel(Id); break; case PanelChangerButtonType.Close: await PanelChangerService.HidePanel(Id); break; case PanelChangerButtonType.Toggle: await PanelChangerService.TogglePanel(Id); break; } } catch (System.Exception e) { LOG.Log(e); throw; } }
public override async Task OnClick() { var res = await NetworkService.RequestMoveCurrentCharacter(MapService.SelectedArea.Id); if (res) { await GameState.RefreshCurrentCharacter(); while (GameState.IsCurrentCharacterMoving) { await Task.Delay(1000); } } await PanelChangerService.HidePanel(GamePanelId.Map); }