private void OnTriggerEnter2D(Collider2D other) { if (!other.CompareTag("Player")) { return; } GameObject player = other.gameObject; RoomPlayerInformation roomPlayerInfo = player.transform.parent.GetComponent <RoomPlayerInformation>(); CameraController camController = player.transform.parent.transform.Find("Camera").GetComponent <CameraController>(); player.GetComponent <Transform>().position = _teleportArrival.GetComponent <Transform>().position; roomPlayerInfo.PlayerRoomLimits = _nextRoomInformation.getRoomLimits(); camController.updateMinMaxLimits(); }
private void UpdatePlayerRoomLimits(RoomPlayerInformation roomPlayerInfo) { roomPlayerInfo.PlayerRoomLimits = _nextRoomInformation.getRoomLimits(); }