<commit_before>﻿using UniRx;
using UniRx.Triggers;
using UnityEngine;

public class CanvasEvents : MonoBehaviour
{
    public Subject<Vector3> VerticalLineOnMouseDownObservable = new Subject<Vector3>();
    public Subject<Vector3> ScrollPadOnMouseEnterObservable = new Subject<Vector3>();
    public Subject<Vector3> ScrollPadOnMouseDownObservable = new Subject<Vector3>();
    public Subject<Vector3> ScrollPadOnMouseExitObservable = new Subject<Vector3>();
    public IObservable<float> MouseScrollWheelObservable;

    void Awake()
    {
        MouseScrollWheelObservable = this.UpdateAsObservable()
            .Select(_ => Input.GetAxis("Mouse ScrollWheel"))
            .Where(delta => delta != 0);
    }

    public void ScrollPadOnMouseDown()
    {
        ScrollPadOnMouseDownObservable.OnNext(Input.mousePosition);
    }

    public void ScrollPadOnMouseEnter()
    {
        ScrollPadOnMouseEnterObservable.OnNext(Input.mousePosition);
    }<commit_msg>Fix NullReferenceException<commit_after>﻿using UniRx;
using UniRx.Triggers;
using UnityEngine;

public class CanvasEvents : MonoBehaviour
{
    public Subject<Vector3> VerticalLineOnMouseDownObservable = new Subject<Vector3>();
    public Subject<Vector3> ScrollPadOnMouseEnterObservable = new Subject<Vector3>();
    public Subject<Vector3> ScrollPadOnMouseDownObservable = new Subject<Vector3>();
    public Subject<Vector3> ScrollPadOnMouseExitObservable = new Subject<Vector3>();
    public Subject<float> MouseScrollWheelObservable = new Subject<float>();

    void Awake()
    {
        this.UpdateAsObservable()
            .Select(_ => Input.GetAxis("Mouse ScrollWheel"))
            .Where(delta => delta != 0)
            .Subscribe(MouseScrollWheelObservable.OnNext);
    }

    public void ScrollPadOnMouseDown()
    {
        ScrollPadOnMouseDownObservable.OnNext(Input.mousePosition);
    }

    public void ScrollPadOnMouseEnter()
    {
        ScrollPadOnMouseEnterObservable.OnNext(Input.mousePosition);
    }
{'fraction_non_alphanumeric': 0.0934203917629332, 'fraction_numerical': 0.009040683073832245, 'mean_word_length': 4.1875, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 26, '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': '120749', 'n_tokens_mistral': 578, 'n_tokens_neox': 547, 'n_words': 105}