<commit_before>using UnityEngine;

namespace SpeedrunTimerMod.GameObservers
{
	[GameObserver]
	class Level2BossObserver : MonoBehaviour
	{
		MyCharacterController _player;
		TunnelBossEndSequence _tunnelSequence;

		void Awake()
		{
			if (!Application.loadedLevelName.StartsWith("Level2_"))
			{
				Destroy(this);
				return;
			}

			var bossObj = GameObject.Find("BossPart3");
			if (bossObj == null)
			{
				Debug.Log($"{nameof(Level2BossObserver)}: Couldn't find BossPart3 object");
				Destroy(this);
				return;
			}

			_tunnelSequence = bossObj.GetComponent<TunnelBossEndSequence>();
		}

		void Start()
		{
			_player = Globals.player.GetComponent<MyCharacterController>();
		}

		void OnEnable()
		{
			_tunnelSequence.evilBlock.attack += EvilBlock_attack;
		}

		void OnDisable()
		{
			if (_tunnelSequence != null)
				_tunnelSequence.evilBlock.attack -= EvilBlock_attack;
			if (_player != null)
				_player.Killed -= Player_Killed;
		}

		void EvilBlock_attack(int attackIndex)
		{
			if (attackIndex != 10)
				return;

			_player.Killed += Player_Killed;
			OnLevel2BossEnd();
		}

		void Player_Killed()
		{
			_player.Killed -= Player_Killed;
			SpeedrunTimer.Instance?.Unsplit();
		}

		void OnLevel2BossEnd()
		{
			Debug.Log("OnLevel2BossEnd: " + DebugBeatListener.DebugStr);
			SpeedrunTimer.Instance?.CompleteLevel(2);
		}
	}
}<commit_msg>change level 2 boss split<commit_after>using System.Reflection;
using UnityEngine;

namespace SpeedrunTimerMod.GameObservers
{
	[GameObserver]
	class Level2BossObserver : MonoBehaviour
	{
		TunnelBossEndSequence _tunnelSequence;
		bool _checkScrollEnded;

		void Awake()
		{
			if (!Application.loadedLevelName.StartsWith("Level2_"))
			{
				Destroy(this);
				return;
			}

			var bossObj = GameObject.Find("BossPart3");
			if (bossObj == null)
			{
				Debug.Log($"{nameof(Level2BossObserver)}: Couldn't find BossPart3 object");
				Destroy(this);
				return;
			}

			_tunnelSequence = bossObj.GetComponent<TunnelBossEndSequence>();
		}

		void OnEnable()
		{
			if (_tunnelSequence != null)
				_tunnelSequence.endScrollingBeat.onBeat += EndScrollingBeat_onBeat;
		}

		void OnDisable()
		{
			if (_tunnelSequence != null)
				_tunnelSequence.endScrollingBeat.onBeat -= EndScrollingBeat_onBeat;
		}

		void EndScrollingBeat_onBeat()
		{
			_checkScrollEnded = true;
		}

		void LateUpdate()
		{
			if (!_checkScrollEnded)
				return;

			_checkScrollEnded = false;

			if (_tunnelSequence.wallToMakeTriggerWhenDoorsStartClosing1.isTrigger)
				OnLevel2BossEnd();
		}

		void OnLevel2BossEnd()
		{
			Debug.Log("OnLevel2BossEnd: " + DebugBeatListener.DebugStr);
			SpeedrunTimer.Instance?.CompleteLevel(2);
			this.enabled = false;
		}
	}
}
{'fraction_non_alphanumeric': 0.11221853082318199, 'fraction_numerical': 0.008121077888519748, 'mean_word_length': 3.9183303085299457, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '975593', 'n_tokens_mistral': 1144, 'n_tokens_neox': 930, 'n_words': 147}