通知組中其他使用者已斷開連線的示例

    /// <summary>
    /// Overrides the onDisconnected function and sets the user object to offline, this can be checked when other players interacts with them...
    /// </summary>
    /// <param name="stopCalled"></param>
    /// <returns></returns>
    public override Task OnDisconnected(bool stopCalled)
    {
        var user = GetUserDictionaryData();
        if (user != null)
        {
            user.Status = PlayerStatus.offline;
            var playerJson = ReturnObjectAsJSON(user.Player);
            Clients.OthersInGroup(user.GroupId).userDisconnected(playerJson);
        }

        return base.OnDisconnected(stopCalled);
    }