예제 #1
0
    private void OnTriggerExit(Collider other)
    {
        RoomInhabitantComponent inhabitant = other.GetComponentInParent <RoomInhabitantComponent>();

        if (inhabitant != null)
        {
            inhabitant.OnRoomExited(this);
            _roomInhabitants.Remove(inhabitant);
        }

        CleanUpInhabitants();
    }