private void Start() { Application.targetFrameRate = 60; StartCoroutine(FadeOutTransition()); // Starting the game from the title/start menu m_currentState = GameState.START; m_dialogueWriter = GetComponent <DialogueWriter>(); m_audioSource = GetComponent <AudioSource>(); m_mainCameraTransform = Camera.main.transform; // Initializing everything needed // GetComponentsInChildren<CrackArea>(m_allCrackArea); m_fixingTool = FindObjectOfType <FixingTool>(); // Instantiating post process profile to modify it at runtime // in case it's not yet fully optimal like described here // https://github.com/Unity-Technologies/PostProcessing/wiki/(v1)-Runtime-post-processing-modification var postBehavior = FindObjectOfType <UnityEngine.PostProcessing.PostProcessingBehaviour>(); m_postProfile = Instantiate(postBehavior.profile); postBehavior.profile = m_postProfile; //m_postProfile.motionBlur.enabled = false; }
private void OnDestroy() { FixingTool.RemoveOnToolChangeFunction(ToggleTool); }
private void Awake() { m_fixingToolRef = GetComponentInParent <FixingTool>(); FixingTool.AddOnToolChangeFunction(ToggleTool); }