<commit_before>(function () {"use strict";})();
/**
 * Created by apizzimenti on 5/19/16.
 */


/**
 * @author <NAME>
 *
 * @desc A set of variables that have to be used in disparate locations.
 * 
 * @type {{anchor: number[], mapTileKey: string[], tween: object[], paramNotExist: function}}
 *
 * @property anchor {number[]} Globalized anchor for all sprites.
 * @property mapTileKey {string[]} Will contain keys for tile sprites.
 * @property tween {array} Default tween settings.
 * @property paramNotExist {function} Global testing method for parameters.
 * @property colorTween {function}
 */

var Globals = {
    anchor: [0.5, 0],
    mapTileKey: [],
    tween: [1000, Phaser.Easing.Linear.None, true, 0, 0, false],

    paramNotExist: function (param, type) {
        return (typeof(param) !== type || param == undefined);
    },

    colorTween: function (game, object, start, end, t) {

    var blend = {step: 0},
        tween = game.add.tween(blend).to({step: 100}, time);

    tween.onUpdateCallback(() => {
        object.tint = Phaser.Color.interpolateColor(start, end, blend.step);
    });

    object.tint = start;
    tween.start();
}
};<commit_msg>add colorTween function<commit_after>(function () {"use strict";})();
/**
 * Created by apizzimenti on 5/19/16.
 */


/**
 * @author <NAME>
 *
 * @desc A set of variables that have to be used in disparate locations.
 * 
 * @type {{anchor: number[], mapTileKey: string[], tween: object[], paramNotExist: function}}
 *
 * @property anchor {number[]} Globalized anchor for all sprites.
 * @property mapTileKey {string[]} Will contain keys for tile sprites.
 * @property tween {array} Default tween settings.
 * @property paramNotExist {function} Global testing method for parameters.
 * @property colorTween {function}
 */

var Globals = {
    anchor: [0.5, 0],
    mapTileKey: [],
    tween: [1000, Phaser.Easing.Linear.None, true, 0, 0, false],

    paramNotExist: function (param, type) {
        return (typeof(param) !== type || param == undefined);
    },

    colorTween: function (game, object, start, end, t) {

        console.dir(object);

        var blend = {step: 0},
            tween = game.add.tween(blend).to({step: 100}, t);

        tween.onUpdateCallback(() => {
            object.tint = Phaser.Color.interpolateColor(start, end, 100, Math.floor(blend.step), 1);
        });

        object.tint = start;
        tween.start();
    }
};
{'fraction_non_alphanumeric': 0.15654688145394466, 'fraction_numerical': 0.016522098306484923, 'mean_word_length': 3.2268760907504364, 'pattern_counts': {'":': 0, '<': 5, '<?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': '73317', 'n_tokens_mistral': 812, 'n_tokens_neox': 766, 'n_words': 227}