<commit_before>var Summon = (function(){
    function Summon(game, x, y, targetX, targetY){
        properties = {
            group: 'summonLayer',
            spritesheet: 'summon'
        };

        Prefab.call(this, game, name, {x:x, y:y}, properties);

        this.speed = 5;
        this.game = game;
        this.timer = 1000;

        this.game.physics.enable(this);
        this.anchor.set(0.5);

        var summonSpeed = 500;

        this.fallTween = this.game.add.tween(this);
        this.fallTween.to({
            x: targetX,
            y: targetY
        }, summonSpeed, Phaser.Easing.Quadratic.Out);

        this.fallTween.start();

        this.tweenRotate = this.game.add.tween(this);
        this.tweenRotate.to({
            angle: 200
        }, summonSpeed, Phaser.Easing.Linear.None);
        this.tweenRotate.start();

        setTimeout(function(){
            this.kill();
        }.bind(this), this.timer);
    };

    Summon.prototype = Object.create(Phaser.Sprite.prototype);<commit_msg>adding some animation to the summon die<commit_after>var Summon = (function(){
    function Summon(game, x, y, targetX, targetY){
        properties = {
            group: 'summonLayer',
            spritesheet: 'summon'
        };

        Prefab.call(this, game, name, {x:x, y:y}, properties);

        this.speed = 5;
        this.game = game;
        this.timer = 1000;

        this.game.physics.enable(this);
        this.anchor.set(0.5);

        var summonSpeed = 500;

        this.fallTween = this.game.add.tween(this);
        this.fallTween.to({
            x: targetX,
            y: targetY
        }, summonSpeed, Phaser.Easing.Quadratic.Out);

        this.fallTween.start();

        this.tweenRotate = this.game.add.tween(this);
        this.tweenRotate.to({
            angle: 200
        }, summonSpeed, Phaser.Easing.Linear.None);
        this.tweenRotate.start();

        setTimeout(function(){
            this.killTween = this.game.add.tween(this)
            this.killTween.to({
                width:0,
                height:0
            }, summonSpeed, Phaser.Easing.Quadratic.Out);


            this.killTween.onComplete.add(function(){
                this.kill();
            }, this);

            this.killTween.start();


        }.bind(this), this.timer);
    };

    Summon.prototype = Object.create(Phaser.Sprite.prototype);
{'fraction_non_alphanumeric': 0.134953897736798, 'fraction_numerical': 0.01173512154233026, 'mean_word_length': 1.8049353701527615, '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': '6298523', 'n_tokens_mistral': 785, 'n_tokens_neox': 732, 'n_words': 125}