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

public class EnemyBoltController : MonoBehaviour {

    public float speed;
    public int damage;
    public float timeToLive;

    // Use this for initialization
    void Start()
    {
        Destroy(gameObject, timeToLive);
    }

    // Update is called once per frame
    void Update()
    {
        transform.Translate(Vector3.up * speed * Time.deltaTime);
    }

    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.tag == "Player")
        {
            other.GetComponent<PlayerHealthManager>().HurtPlayer(damage);
            Destroy(gameObject);
        }
        else if (other.tag == "Environment")
        {
            Destroy(gameObject);
        }
    }
}<commit_msg>Minor fix to make the ranged enemy not be able to shoot through walls.<commit_after>﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EnemyBoltController : MonoBehaviour {

    public float speed;
    public int damage;
    public float timeToLive;

    // Use this for initialization
    void Start()
    {
        Destroy(gameObject, timeToLive);
    }

    // Update is called once per frame
    void Update()
    {
        transform.Translate(Vector3.up * speed * Time.deltaTime);
    }

    void OnTriggerEnter2D(Collider2D other)
    {
        switch (other.tag)
        {
            case "Player":
                other.GetComponent<PlayerHealthManager>().HurtPlayer(damage);
                Destroy(gameObject);
                break;
            case "EnvHard":
                Destroy(gameObject);
                break;
            case "EnvSoft":
                break;
            default:
                break;
        }
    }
}
{'fraction_non_alphanumeric': 0.08744394618834081, 'fraction_numerical': 0.0033632286995515697, 'mean_word_length': 1.955298013245033, 'pattern_counts': {'":': 3, '<': 5, '<?xml version=': 0, '>': 5, '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': '3421599', 'n_tokens_mistral': 496, 'n_tokens_neox': 472, 'n_words': 121}