예제 #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);