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(); } } }
void IClientListener <TPlayerStatus, TRoomMessage, TMsg> .OnPlayerExited(ulong id) => OnPlayerExited.Invoke(id);