<commit_before>package com.jukusoft.libgdx.rpg.engine.entity.factory;

import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.jukusoft.libgdx.rpg.engine.entity.Entity;
import com.jukusoft.libgdx.rpg.engine.entity.EntityManager;
import com.jukusoft.libgdx.rpg.engine.entity.impl.component.*;
import com.jukusoft.libgdx.rpg.engine.utils.Direction;

/**
 * Created by Justin on 09.03.2017.
 */
public class ProjectileFactory {

    public static Entity createBasicProjectile (EntityManager ecs, String atlasPath, Direction direction, float x, float y, float speedX, float speedY) {
        //create new entity
        Entity entity = new Entity(ecs);

        //add new position component, because every entity has an position
        entity.addComponent(new PositionComponent(x, y), PositionComponent.class);

        //add an movement component, so projectile can be moved by update() method
        entity.addComponent(new MoveComponent(), MoveComponent.class);

        //set direction
        entity.getComponent(MoveComponent.class).setDirection(direction);

        //add texture region component to draw projectile
        entity.addComponent(new DrawTextureRegionComponent(), DrawTextureRegionComponent.class);

        //add animation component
        entity.addComponent(new AtlasAnimationComponent(atlasPath, "standDown", 1f), AtlasAnimationComponent.class);

        //add component to control movement animations
        entity.addComponent(new BasicMovementAnimationControlComponent(), BasicMovementAnimationControlComponent.class);

        //add shadow component
        entity.addComponent(new BlobShadowComponent(10, 32), BlobShadowComponent.class);

        return entity;
    }

    public static Entity createBasicProjectile (EntityManager ecs, TextureRegion textureRegion, float x, float y, float speedX, float speedY) {
        //create new entity
        Entity entity = new Entity(ecs);

        //add new position component, because every entity has an position
        entity.addComponent(new PositionComponent(x, y), PositionComponent.class);

        //add an movement component, so projectile can be moved by update() method
        entity.addComponent(new MoveComponent(), MoveComponent.class);

        //add texture region component to draw projectile
        entity.addComponent(new DrawTextureRegionComponent(textureRegion), DrawTextureRegionComponent.class);

        //add shadow component
        entity.addComponent(new BlobShadowComponent(10, 32), BlobShadowComponent.class);

        return entity;
    }

}
<commit_msg>changed ProjectileFactory.<commit_after>package com.jukusoft.libgdx.rpg.engine.entity.factory;

import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.jukusoft.libgdx.rpg.engine.entity.Entity;
import com.jukusoft.libgdx.rpg.engine.entity.EntityManager;
import com.jukusoft.libgdx.rpg.engine.entity.impl.component.*;
import com.jukusoft.libgdx.rpg.engine.utils.Direction;

/**
 * Created by Justin on 09.03.2017.
 */
public class ProjectileFactory {

    public static Entity createBasicProjectile (EntityManager ecs, String atlasPath, Direction direction, float x, float y, float speedX, float speedY) {
        //create new entity
        Entity entity = new Entity(ecs);

        //add new position component, because every entity has an position
        entity.addComponent(new PositionComponent(x, y), PositionComponent.class);

        //add an movement component, so projectile can be moved by update() method
        entity.addComponent(new MoveComponent(speedX, speedY), MoveComponent.class);

        //set direction
        entity.getComponent(MoveComponent.class).setDirection(direction);

        //add texture region component to draw projectile
        entity.addComponent(new DrawTextureRegionComponent(), DrawTextureRegionComponent.class);

        //add animation component
        entity.addComponent(new AtlasAnimationComponent(atlasPath, "standDown", 1f), AtlasAnimationComponent.class);

        //add component to control movement animations
        entity.addComponent(new BasicMovementAnimationControlComponent(), BasicMovementAnimationControlComponent.class);

        //add shadow component
        entity.addComponent(new BlobShadowComponent(10, 32), BlobShadowComponent.class);

        return entity;
    }

    public static Entity createBasicProjectile (EntityManager ecs, TextureRegion textureRegion, float x, float y, float speedX, float speedY) {
        //create new entity
        Entity entity = new Entity(ecs);

        //add new position component, because every entity has an position
        entity.addComponent(new PositionComponent(x, y), PositionComponent.class);

        //add an movement component, so projectile can be moved by update() method
        entity.addComponent(new MoveComponent(), MoveComponent.class);

        //add texture region component to draw projectile
        entity.addComponent(new DrawTextureRegionComponent(textureRegion), DrawTextureRegionComponent.class);

        //add shadow component
        entity.addComponent(new BlobShadowComponent(10, 32), BlobShadowComponent.class);

        return entity;
    }

}

{'fraction_non_alphanumeric': 0.08444702692233198, 'fraction_numerical': 0.006972690296339338, 'mean_word_length': 3.7116788321167884, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7254337', 'n_tokens_mistral': 1362, 'n_tokens_neox': 1297, 'n_words': 370}