コード例 #1
0
ファイル: RoomComponent.cs プロジェクト: saddamsial/ggj-2020
    private void OnTriggerExit(Collider other)
    {
        RoomInhabitantComponent inhabitant = other.GetComponentInParent <RoomInhabitantComponent>();

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

        CleanUpInhabitants();
    }