<commit_before>﻿namespace KaiFighterGame.Objects.DynamicObjects.Projectiles
{
    using Interfaces;
    using Microsoft.Xna.Framework;
    using Utilities;

    public class Bullet : DynamicObject, IKiller
    {
        private const string CollisionGroupString = "Bullet";
        private Vector2 targetDir;
        private bool isPlayerFire;

        public Bullet(Vector2 position, string imageLocation, ObjectType objectType, Color? objColor, float scale, float rotation, float layerDepth, float movementSpeed, double damage, Vector2 targetDirection)
            : base(position, imageLocation, objectType, objColor, scale, rotation, layerDepth, movementSpeed)
        {
            this.Damage = damage;
            this.targetDir = targetDirection;
        }

        public double Damage { get; set; }

        // TODO - Change that !!!
        public bool IsPlayerFire
        {
            get
            {
                return this.isPlayerFire;
            }
            set
            {
                this.isPlayerFire = value;
            }
        }

        

        public override void Initialize()
        {
            this.MoveWithoutStop(this.targetDir);
        }

        public override void RespondToCollision(ICollidable gameObject)
        {
            if (this.IsPlayerFire == true)
            {
                if (gameObject.ObjType != ObjectType.Player && gameObject.ObjType != ObjectType.Bullet)
                {
                    SceneManager.DestroyObject(this);
                }
            }
            else
            {
                if (gameObject.ObjType != ObjectType.Archer && gameObject.ObjType != ObjectType.Bullet)
                {
                    SceneManager.DestroyObject(this);
                }
            }
        }
    }
}<commit_msg>Fixed the problem bullet-bonus<commit_after>﻿namespace KaiFighterGame.Objects.DynamicObjects.Projectiles
{
    using Interfaces;
    using Microsoft.Xna.Framework;
    using Utilities;

    public class Bullet : DynamicObject, IKiller
    {
        private const string CollisionGroupString = "Bullet";
        private Vector2 targetDir;
        private bool isPlayerFire;

        public Bullet(Vector2 position, string imageLocation, ObjectType objectType, Color? objColor, float scale, float rotation, float layerDepth, float movementSpeed, double damage, Vector2 targetDirection)
            : base(position, imageLocation, objectType, objColor, scale, rotation, layerDepth, movementSpeed)
        {
            this.Damage = damage;
            this.targetDir = targetDirection;
        }

        public double Damage { get; set; }

        // TODO - Change that !!!
        public bool IsPlayerFire
        {
            get
            {
                return this.isPlayerFire;
            }
            set
            {
                this.isPlayerFire = value;
            }
        }

        

        public override void Initialize()
        {
            this.MoveWithoutStop(this.targetDir);
        }

        /// <summary>
        /// If the bullet shound not react when colliding with other bullet and bonus
        /// Also the shooter shoud not be affected
        /// </summary>
        /// <param name="gameObject"></param>
        public override void RespondToCollision(ICollidable gameObject)
        {
            if (this.IsPlayerFire == true)
            {
                if (gameObject.ObjType != ObjectType.Player 
                    && gameObject.ObjType != ObjectType.Bullet
                    && gameObject.ObjType != ObjectType.Bonus)
                {
                    SceneManager.DestroyObject(this);
                }
            }
            else
            {
                if (gameObject.ObjType != ObjectType.Archer
                    && gameObject.ObjType != ObjectType.Bullet
                    && gameObject.ObjType != ObjectType.Bonus)
                {
                    SceneManager.DestroyObject(this);
                }
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.07388688327316487, 'fraction_numerical': 0.001444043321299639, 'mean_word_length': 1.4233236151603499, 'pattern_counts': {'":': 0, '<': 7, '<?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': '259437', 'n_tokens_mistral': 1037, 'n_tokens_neox': 947, 'n_words': 231}