示例#1
0
 public void Close()
 {
     canvas.enabled          = false;
     Player.Instance.enabled = true;
     OnInventoryClosed?.Invoke();
     open = false;
 }
        /// <summary>
        /// Removes ability to interact with this inventory for this player. Returns a close inventory packet that can be sent to the server for synchronization.
        /// </summary>
        /// <param name="player"></param>
        /// <returns></returns>
        public virtual object Close(IPlayer player)
        {
            object packet = InvNetworkUtil.DidClose(player);

            openedByPlayerGUIds.Remove(player.PlayerUID);

            OnInventoryClosed?.Invoke(player);

            return(packet);
        }
示例#3
0
        /// <summary>
        /// Removes ability to interact with this inventory for this player. Returns a close inventory packet that can be sent to the server for synchronization.
        /// </summary>
        /// <param name="player"></param>
        /// <returns></returns>
        public virtual object Close(IPlayer player)
        {
            object packet = InvNetworkUtil.DidClose(player);

            openedByPlayerGUIds.Remove(player.PlayerUID);

            OnInventoryClosed?.Invoke(player);

            Api.World.Logger.Audit("{0} closed inventory {1}", player.PlayerName, InventoryID);

            return(packet);
        }
 public static void NotifyInventoryClose()
 {
     OnPlayerActivated?.Invoke();
     OnInventoryClosed?.Invoke();
 }