示例#1
0
    private void Update()
    {
        foreach (var trigger in playerTriggers)
        {
            bool any = false;
            if (trigger.playerInside)
            {
                any = true;

                if (!playerInside)
                {
                    playerInside = true;
                    OnPlayerEntered?.Invoke();
                }

                break;
            }
            if (!any && playerInside)
            {
                playerInside = false;
                OnPlayerExited?.Invoke();
            }
        }
    }
示例#2
0
 void IClientListener <TPlayerStatus, TRoomMessage, TMsg> .OnPlayerExited(ulong id) => OnPlayerExited.Invoke(id);