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

public class ShotControl : MonoBehaviour {

	public float speed = 0.2f;

	private bool inBlock;

	private int life = 3;

	void Start () {
	}
	
	void Update () {
		// Old position
		Vector3 position = transform.position;

		// Move
		transform.Translate(Vector3.up * speed);

		// Check for collision
		Collider2D collider = Physics2D.OverlapCircle(transform.position, 0.1f);
		if (collider) {
			if (collider.name == "ArenaBlock") {
				if (!inBlock) {
					// Reduce life
					if (--life == 0) {<commit_msg>Check for shots going out of bounds and kill them<commit_after>﻿using UnityEngine;
using System.Collections;

public class ShotControl : MonoBehaviour {

	public float speed = 0.2f;

	private bool inBlock;

	private int life = 3;

	void Start () {
	}
	
	void Update () {
		// Old position
		Vector3 position = transform.position;

		// Move
		transform.Translate(Vector3.up * speed);

		// Check for out of bounds
		if (100f <= Mathf.Abs(transform.position.magnitude)) {
			Destroy(gameObject);
			return;
		}

		// Check for collision
		Collider2D collider = Physics2D.OverlapCircle(transform.position, 0.15f);
		if (collider) {
			if (collider.name == "ArenaBlock") {
				if (!inBlock) {
					// Reduce life
					if (--life == 0) {
{'fraction_non_alphanumeric': 0.11895625479662318, 'fraction_numerical': 0.01841903300076746, 'mean_word_length': 3.1528662420382165, 'pattern_counts': {'":': 0, '<': 4, '<?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': '4599132', 'n_tokens_mistral': 500, 'n_tokens_neox': 419, 'n_words': 119}