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

        if (inhabitant != null)
        {
            _roomInhabitants.Add(inhabitant);
            inhabitant.OnRoomEntered(this);
        }

        CleanUpInhabitants();
    }