<commit_before>﻿namespace Game
{
    using System;
    using System.Collections;
    using UnityEngine;

    public class CutsceneManager : MonoBehaviour
    {
        public static CutsceneManager instance { get; private set; }

        public Texture2D texture;

        [Range(0.01f, 0.9f)]
        public float slowTime = 0.2f;

        [Range(1f, 60f)]
        public float durationInSeconds = 3f;

        private bool _showing;
        private Vector3 _focus;
        private GameObject _go;

        private void OnEnable()
        {
            if (this.texture == null)
            {
                throw new ArgumentNullException("texture");
            }

            if (instance != null)
            {
                Debug.LogWarning(this.ToString() + " another CutsceneManager has already been registered");
                Destroy(this);
                return;
            }

            instance = this;
        }

        private void OnGUI()
        {
            if (!_showing || this.texture == null)
            {
                return;
            }

            var width = Screen.width;
            var height = Screen.height;<commit_msg>CutsceneManager does not throw exception if missing texture, instead show warning<commit_after>﻿namespace Game
{
    using System.Collections;
    using UnityEngine;

    public class CutsceneManager : MonoBehaviour
    {
        public static CutsceneManager instance { get; private set; }

        public Texture2D texture;

        [Range(0.01f, 0.9f)]
        public float slowTime = 0.2f;

        [Range(1f, 60f)]
        public float durationInSeconds = 3f;

        private bool _showing;
        private Vector3 _focus;
        private GameObject _go;

        private void OnEnable()
        {
            if (this.texture == null)
            {
                Debug.LogWarning(this.ToString() + " is missing an overlay texture");
            }

            if (instance != null)
            {
                Debug.LogWarning(this.ToString() + " another CutsceneManager has already been registered");
                Destroy(this);
                return;
            }

            instance = this;
        }

        private void OnGUI()
        {
            if (!_showing || this.texture == null)
            {
                return;
            }

            var width = Screen.width;
            var height = Screen.height;
{'fraction_non_alphanumeric': 0.08008298755186723, 'fraction_numerical': 0.010788381742738589, 'mean_word_length': 1.4804526748971194, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1201611', 'n_tokens_mistral': 633, 'n_tokens_neox': 586, 'n_words': 170}