<commit_before>﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using System.Diagnostics;
using System;

using System.Collections;
using System.Collections.Generic;


namespace PaddleBall
{
    class Enemy : GameObject
    {
        int health = 1;
        Vector2 velocity = Vector2.Zero;
        CircleCollider myCollider;

        public Enemy() : base() { }

        float scaleSize = 0.5f;
        public override void LoadContent(ContentManager Content)
        {
            texturePath = "Images/bugEnemy1";
            scale = Vector2.One * scaleSize;
            myCollider = new CircleCollider(Layer.Enemy,this, 75 * scaleSize);
            base.LoadContent(Content);
        }


        public void SetVelocity(Vector2 moveDir, float moveSpeed)
        {
            Vector2 normalizedMoveDir = Vector2.Normalize(moveDir);
            this.velocity = normalizedMoveDir *10;//moveSpeed;
            float degToRad = (float)Math.PI / 180f;
            rotation = (float)Math.Atan2(normalizedMoveDir.Y, normalizedMoveDir.X) - 90f* degToRad;
        }
       
        public override void Update(GameTime gameTime)
        {
            position += velocity;
        }

        public void TakeDamage() {
            ScoreBoard.Instance.AddPoints();
            health--;
            if (health <= 0) {
                AudioManager.Instance.PlaySound(SoundFX.DestroyEnemy);
                myCollider.Destroy();
                Destroy();
            }
        }

        public override void Destroy() {
            EnemySpawner.Instance.ReportEnemyDown();
            base.Destroy();
        }
    }
}<commit_msg>slowed down the bug speed to normal...(it was super fast for quick debugging)<commit_after>﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using System.Diagnostics;
using System;

using System.Collections;
using System.Collections.Generic;


namespace PaddleBall
{
    class Enemy : GameObject
    {
        int health = 1;
        Vector2 velocity = Vector2.Zero;
        CircleCollider myCollider;

        public Enemy() : base() { }

        float scaleSize = 0.5f;
        public override void LoadContent(ContentManager Content)
        {
            texturePath = "Images/bugEnemy1";
            scale = Vector2.One * scaleSize;
            myCollider = new CircleCollider(Layer.Enemy,this, 75 * scaleSize);
            base.LoadContent(Content);
        }


        public void SetVelocity(Vector2 moveDir, float moveSpeed)
        {
            Vector2 normalizedMoveDir = Vector2.Normalize(moveDir);
            this.velocity = normalizedMoveDir  * moveSpeed;
            float degToRad = (float)Math.PI / 180f;
            rotation = (float)Math.Atan2(normalizedMoveDir.Y, normalizedMoveDir.X) - 90f* degToRad;
        }
       
        public override void Update(GameTime gameTime)
        {
            position += velocity;
        }

        public void TakeDamage() {
            ScoreBoard.Instance.AddPoints();
            health--;
            if (health <= 0) {
                AudioManager.Instance.PlaySound(SoundFX.DestroyEnemy);
                myCollider.Destroy();
                Destroy();
            }
        }

        public override void Destroy() {
            EnemySpawner.Instance.ReportEnemyDown();
            base.Destroy();
        }
    }
}
{'fraction_non_alphanumeric': 0.0912981455064194, 'fraction_numerical': 0.011412268188302425, 'mean_word_length': 2.0120274914089347, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3132313', 'n_tokens_mistral': 976, 'n_tokens_neox': 931, 'n_words': 204}