Newer
Older
HoloAnatomy / Assets / HoloToolkit / Sharing / Scripts / SDK / UserPresenceManagerAdapter.cs
SURFACEBOOK2\jackwynne on 25 May 2018 819 bytes v1
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

namespace HoloToolkit.Sharing
{
    /// <summary>
    /// Allows users of UserPresenceManager to register to receive event callbacks without
    /// having their classes inherit directly from UserPresenceManagerListener
    /// </summary>
    public class UserPresenceManagerAdapter : UserPresenceManagerListener
    {
        public event System.Action<User> UserPresenceChangedEvent;

        public UserPresenceManagerAdapter() { }

        public override void OnUserPresenceChanged(User user)
        {
            if (this.UserPresenceChangedEvent != null)
            {
                this.UserPresenceChangedEvent(user);
            }
        }
    }
}