Example #1
0
        private async void OnDeleteCharacter(object sender, CharacterIdOverlayEventArgs e)
        {
            this.Logger.Debug($"Delete character with ID {e.CharacterId}");

            this.overlay.Characters = await this.Comms.Event(CharacterEvents.Delete).ToServer().Request <List <Character> >(e.CharacterId);

            this.overlay.SyncCharacters();
        }
Example #2
0
        private async void OnSelectCharacter(object sender, CharacterIdOverlayEventArgs e)
        {
            this.characterSession = await this.Comms.Event(CharacterEvents.Select).ToServer().Request <CharacterSession>(e.CharacterId);

            // Notify the client that we've selected a character
            this.Comms.Event(CharacterEvents.Selected).ToClient().Emit(this.characterSession);
            await PlaySelectedCharacter(e.Overlay, this.characterSession.Character);
        }