示例#1
0
            internal void InvokePocketDimensionLeaveEvent(Player player, ref UnityEngine.Vector3 pos, ref PocketDimensionTeleport.PDTeleportType teleportType, out bool allow)
            {
                var ev = new PocketDimensionLeaveEventArgs
                {
                    ExitPosition = pos,
                    Player       = player,
                    TeleportType = teleportType
                };

                PocketDimensionLeaveEvent?.Invoke(ev);

                pos          = ev.ExitPosition;
                teleportType = ev.TeleportType;
                allow        = ev.Allow;
            }
示例#2
0
        internal static void InvokePocketDimensionLeave(Player player, ref PocketDimensionTeleport.PDTeleportType type, out bool allow)
        {
            allow = true;
            if (PocketDimensionLeaveEvent == null)
            {
                return;
            }

            var ev = new PocketDimensionLeave
            {
                Allow        = true,
                Player       = player,
                TeleportType = type
            };

            PocketDimensionLeaveEvent.Invoke(ev);

            allow = ev.Allow;
            type  = ev.TeleportType;
        }