<commit_before>﻿using UnityEngine;
using System.Collections;


public class SplatOnCollision : MonoBehaviour {

    public GameObject[] splatTypes;

    void OnCollisionEnter(Collision collision)
    {
        var paintball = gameObject;
        var hit = collision.contacts[0];
        var otherObject = hit.otherCollider;

        var splatType = splatTypes[Random.Range(0, splatTypes.Length)];
        var splatPosition = otherObject.ClosestPointOnBounds(hit.point);
        var splatRotation = Quaternion.FromToRotation(Vector3.up, hit.normal);
        var splat = Instantiate(splatType, splatPosition, splatRotation) as GameObject;

        // randomly rotate the splat to vary its appearance
        splat.transform.Rotate(0, Random.Range(0f, 360f), 0);

        Destroy(paintball);
        Destroy(splat, 5);
    }
}<commit_msg>Keep splats around for 30 seconds instead of 5<commit_after>﻿using UnityEngine;
using System.Collections;


public class SplatOnCollision : MonoBehaviour {

    public GameObject[] splatTypes;

    void OnCollisionEnter(Collision collision)
    {
        var paintball = gameObject;
        var hit = collision.contacts[0];
        var otherObject = hit.otherCollider;

        var splatType = splatTypes[Random.Range(0, splatTypes.Length)];
        var splatPosition = otherObject.ClosestPointOnBounds(hit.point);
        var splatRotation = Quaternion.FromToRotation(Vector3.up, hit.normal);
        var splat = Instantiate(splatType, splatPosition, splatRotation) as GameObject;

        // randomly rotate the splat to vary its appearance
        splat.transform.Rotate(0, Random.Range(0f, 360f), 0);

        Destroy(paintball);
        Destroy(splat, 30);
    }
}
{'fraction_non_alphanumeric': 0.0892018779342723, 'fraction_numerical': 0.014084507042253521, 'mean_word_length': 3.2947103274559195, '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': '1554657', 'n_tokens_mistral': 532, 'n_tokens_neox': 492, 'n_words': 120}