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

public class ProjectileScript : MonoBehaviour {
	public float lifetimeInSeconds = 2.0f;
	float lifetime = 0;

	// Use this for initialization
	void Start () {
		if (!rigidbody) {
			gameObject.AddComponent<Rigidbody> ();
		}
		lifetime = 0;
	}

	void Update(){
		lifetime += Time.deltaTime;
		if (lifetime > lifetimeInSeconds) {
			Destroy(gameObject);
		}
	}


	void OnCollisionEnter(Collision c){
		c.collider.SendMessage ("Damage", 1);
		Destroy (gameObject);
	}
}<commit_msg>You can now choose to not create a rigidbody in ProjectileScript<commit_after>﻿using UnityEngine;
using System.Collections;

public class ProjectileScript : MonoBehaviour {
	public float lifetimeInSeconds = 2.0f;
	public bool addRigidBody = true;
	float lifetime = 0;

	// Use this for initialization
	void Start () {
		if (!rigidbody && addRigidBody) {
			gameObject.AddComponent<Rigidbody> ();
		}
		lifetime = 0;
	}

	void Update(){
		lifetime += Time.deltaTime;
		if (lifetime > lifetimeInSeconds) {
			Destroy(gameObject);
		}
	}


	void OnCollisionEnter(Collision c){
		c.collider.SendMessage ("Damage", 1);
		Destroy (gameObject);
	}
}
{'fraction_non_alphanumeric': 0.1132713440405748, 'fraction_numerical': 0.0084530853761623, 'mean_word_length': 4.215859030837004, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '6860885', 'n_tokens_mistral': 430, 'n_tokens_neox': 388, 'n_words': 99}