Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                
              
            
!

CSS

              
                
              
            
!

JS

              
                var _0x6936 = ["MainGame_2", "35px font_GDR", "#fff34c", "center", "18px font_GDR", "#e10020", "18px font_GD", "#441500", "prototype", "tween_time", "cal_score", "speed_item", "speed_static", "speed_bg", "speed_game", "max_speed_game", "speed_player", "isGamestart", "isGameover", "timeGenerate", "timePlay", "currentTime", "timeItem", "items", "numItem", "countItem", "listItem", "collect_text", "groupItems", "stones", "groupStones", "itemState", "groupItem", "MAX_ITEM_PER_TYPE", "max_time_bar", "setBounds", "world", "Physics", "startSystem", "physics", "setImpactEvents", "p2", "restitution", "advancedTiming", "time", "forceSingleUpdate", "cursors", "createCursorKeys", "keyboard", "input", "background", "bg_game", "tileSprite", "add", "x", "y", "width", "height", "createPreviewBounds", "player", "sprite", "name", "boy", "setTo", "anchor", "smoothed", "anim", "animations", "play", "enable", "setCircle", "body", "fixedRotation", "group", "enableBody", "physicsBodyType", "P2JS", "length", "item", "create", "checkWorldBounds", "outOfBoundsKill", "kill", "push", "groupStone", "stone", "static", "checkVeg", "setPostBroadphaseCallback", "frame_score", "score", "scoreText", "20px font_ND", "#fff", "text", "session", "total_play_session", "initGame", "showSound", "Preloader", "states", "state", "bird", "xxx", "visible", "top", "display_name", "total_score", "", "...", "-   ", "mask", "boundsCollisionGroup", "left", "pxmi", "addShape", "right", "bottom", "addBody", "key", "velocity", "tilePosition", "desktop", "device", "iPad", "iPhone", "iPhone4", "android", "activePointer", "distanceToPointer", "arcade", "moveToPointer", "set", "isDown", "up", "down", "now", "remove", "tweens", "time_bar", "Power1", "to", "tween", "game", "start", "index", "_frame", "effectScore", "+", "s", "updateTimeBar", "-", "effectStar", "Linear", "timeLoop", "events", "effect_good", "effect_bad", "scale", "bg", "result_2", "30px font_ND", " x ", "btn_continue", "button", "checkExist", "integerInRange", "rnd", "addStone", "number", "addItem", "itemAnimation", "alive", "reset", "Timer", "updateCurrentTime", "loop", "time_base", "onComplete", "btnAnimation"];
Template["MainGame_2"] = function (_0xd21dx1) {};
var styleEffect = {
    font: _0x6936[1],
    fill: _0x6936[2],
    align: _0x6936[3]
};
var styleResult = {
    font: _0x6936[4],
    fill: _0x6936[5],
    align: _0x6936[3]
};
var stypeTop = {
    font: _0x6936[6],
    fill: _0x6936[7],
    align: _0x6936[3]
};
var customBounds;
Template[_0x6936[0]][_0x6936[8]] = {
    create: function () {
        this[_0x6936[9]];
        this[_0x6936[10]] = 0;
        this[_0x6936[11]] = 200;
        this[_0x6936[12]] = 350;
        this[_0x6936[13]] = 6;
        this[_0x6936[14]] = 0.5;
        this[_0x6936[15]] = 1.2;
        this[_0x6936[16]] = 200;
        this[_0x6936[17]] = false;
        this[_0x6936[18]] = false;
        this[_0x6936[19]] = 0;
        this[_0x6936[20]] = 30;
        this[_0x6936[21]] = this[_0x6936[20]];
        this[_0x6936[22]] = 5;
        this[_0x6936[23]] = [];
        this[_0x6936[24]] = 14;
        this[_0x6936[25]] = [];
        this[_0x6936[26]] = [];
        this[_0x6936[27]] = [];
        this[_0x6936[28]] = [];
        this[_0x6936[29]] = [];
        this[_0x6936[30]] = [];
        this[_0x6936[31]] = 0;
        this[_0x6936[32]];
        this[_0x6936[33]] = 10;
        this[_0x6936[34]];
        game[_0x6936[36]][_0x6936[35]](0, -200, 1366, 50000);
        game[_0x6936[39]][_0x6936[38]](Phaser[_0x6936[37]].ARCADE);
        game[_0x6936[39]][_0x6936[38]](Phaser[_0x6936[37]].P2JS);
        game[_0x6936[39]][_0x6936[41]][_0x6936[40]](true);
        game[_0x6936[39]][_0x6936[41]][_0x6936[42]] = 0.8;
        game[_0x6936[44]][_0x6936[43]] = true;
        game[_0x6936[45]] = true;
        this[_0x6936[46]] = game[_0x6936[49]][_0x6936[48]][_0x6936[47]]();
        this[_0x6936[50]] = this[_0x6936[53]][_0x6936[52]](0, 0, w, h, _0x6936[51]);
        var _0xd21dx6 = new Phaser.Rectangle(w / 2 - 320, -200, 640, 843);
        customBounds = {
            left: null,
            right: null,
            top: null,
            bottom: null
        };
        this[_0x6936[58]](_0xd21dx6[_0x6936[54]], _0xd21dx6[_0x6936[55]], _0xd21dx6[_0x6936[56]], _0xd21dx6[_0x6936[57]]);
        this[_0x6936[59]] = this[_0x6936[53]][_0x6936[60]](w / 2, h - 100, _0x6936[59]);
        this[_0x6936[59]][_0x6936[61]] = _0x6936[62];
        this[_0x6936[59]][_0x6936[64]][_0x6936[63]](0.5);
        this[_0x6936[59]][_0x6936[65]] = false;
        this[_0x6936[59]][_0x6936[67]][_0x6936[53]](_0x6936[66], [0, 1, 2, 3], 5, true);
        this[_0x6936[59]][_0x6936[68]](_0x6936[66]);
        game[_0x6936[39]][_0x6936[41]][_0x6936[69]](this[_0x6936[59]], false);
        this[_0x6936[59]][_0x6936[71]][_0x6936[70]](this[_0x6936[59]][_0x6936[56]] / 3);
        this[_0x6936[59]][_0x6936[71]][_0x6936[72]] = true;
        this[_0x6936[32]] = game[_0x6936[53]][_0x6936[73]]();
        this[_0x6936[32]][_0x6936[74]] = true;
        this[_0x6936[32]][_0x6936[75]] = Phaser[_0x6936[37]][_0x6936[76]];
        for (var _0xd21dx7 = 0; _0xd21dx7 < data_item[_0x6936[77]]; _0xd21dx7++) {
            var _0xd21dx8 = [];
            for (var _0xd21dx9 = 0; _0xd21dx9 < this[_0x6936[33]]; _0xd21dx9++) {
                var _0xd21dxa = this[_0x6936[32]][_0x6936[79]](-1000, -1000, _0x6936[78], _0xd21dx7);
                _0xd21dxa[_0x6936[64]][_0x6936[63]](0.5);
                _0xd21dxa[_0x6936[71]][_0x6936[70]](_0xd21dxa[_0x6936[56]] / 3);
                _0xd21dxa[_0x6936[80]] = true;
                _0xd21dxa[_0x6936[81]] = true;
                _0xd21dxa[_0x6936[71]][_0x6936[72]] = true;
                _0xd21dxa[_0x6936[82]]();
                _0xd21dx8[_0x6936[83]](_0xd21dxa)
            };
            this[_0x6936[28]][_0x6936[83]](_0xd21dx8)
        };
        this[_0x6936[84]] = game[_0x6936[53]][_0x6936[73]]();
        this[_0x6936[84]][_0x6936[74]] = true;
        this[_0x6936[84]][_0x6936[75]] = Phaser[_0x6936[37]][_0x6936[76]];
        for (var _0xd21dx7 = 0; _0xd21dx7 < 50; _0xd21dx7++) {
            var _0xd21dxb = this[_0x6936[84]][_0x6936[79]](-500, -500, _0x6936[85]);
            _0xd21dxb[_0x6936[64]][_0x6936[63]](0.5);
            _0xd21dxb[_0x6936[80]] = true;
            _0xd21dxb[_0x6936[81]] = true;
            _0xd21dxb[_0x6936[71]][_0x6936[86]] = true;
            _0xd21dxb[_0x6936[82]]();
            this[_0x6936[30]][_0x6936[83]](_0xd21dxb)
        };
        game[_0x6936[39]][_0x6936[41]][_0x6936[88]](this[_0x6936[87]], this);
        this[_0x6936[89]] = game[_0x6936[53]][_0x6936[60]](w / 2 + 220, 15, _0x6936[90]);
        this[_0x6936[91]] = game[_0x6936[53]][_0x6936[94]](w / 2 + 262, 37, this[_0x6936[10]], {
            font: _0x6936[92],
            fill: _0x6936[93],
            align: _0x6936[3]
        });
        this[_0x6936[91]][_0x6936[64]][_0x6936[63]](0.5);
        if (user_info != null) {
            game[_0x6936[53]][_0x6936[60]](w / 2 + 225, 60, _0x6936[95]);
            var _0xd21dxc = _0x6936[54] + user_info[_0x6936[96]];
            var _0xd21dxd = game[_0x6936[53]][_0x6936[94]](w / 2 + 267, 82, _0xd21dxc, {
                font: _0x6936[92],
                fill: _0x6936[93],
                align: _0x6936[3]
            });
            _0xd21dxd[_0x6936[64]][_0x6936[63]](0.5)
        };
        for (var _0xd21dx7 = 0; _0xd21dx7 < data_item[_0x6936[77]]; _0xd21dx7++) {
            this[_0x6936[25]][_0xd21dx7] = 0;
            this[_0x6936[26]][_0xd21dx7] = 0
        };
        this[_0x6936[97]]();
        this.ShowBird();
        this.ShowTop();
        game[_0x6936[101]][_0x6936[100]][_0x6936[99]][_0x6936[98]]()
    },
    ShowBird: function () {
        this[_0x6936[102]] = game[_0x6936[53]][_0x6936[60]](w / 2 - 300, h / 2 - 40, _0x6936[102]);
        this[_0x6936[103]] = game[_0x6936[53]][_0x6936[60]](w / 2 - 200, h / 2 + 50, _0x6936[103]);
        this[_0x6936[102]][_0x6936[104]] = false;
        this[_0x6936[103]][_0x6936[104]] = false
    },
    ShowTop: function () {
        var _0xd21dxe = game[_0x6936[53]][_0x6936[60]](20, 40, _0x6936[105]);
        for (var _0xd21dx7 = 0; _0xd21dx7 < top_user[_0x6936[77]]; _0xd21dx7++) {
            if (top_user[_0xd21dx7][_0x6936[106]] != null && top_user[_0xd21dx7][_0x6936[107]] != null) {
                var _0xd21dxf = game[_0x6936[53]][_0x6936[94]](_0xd21dxe[_0x6936[54]] + 30, _0xd21dxe[_0x6936[55]] + 100 + 30 * _0xd21dx7, top_user[_0xd21dx7][_0x6936[106]], stypeTop);
                if (top_user[_0xd21dx7][_0x6936[106]][_0x6936[77]] > 7) {
                    var _0xd21dx10 = _0x6936[108];
                    for (var _0xd21dx9 = 0; _0xd21dx9 < 7; _0xd21dx9++) {
                        _0xd21dx10 += top_user[_0xd21dx7][_0x6936[106]][_0xd21dx9]
                    };
                    _0xd21dx10 += _0x6936[109];
                    _0xd21dxf[_0x6936[94]] = _0xd21dx10
                };
                game[_0x6936[53]][_0x6936[94]](_0xd21dxe[_0x6936[54]] + 125, _0xd21dxe[_0x6936[55]] + 100 + 30 * _0xd21dx7, _0x6936[110] + top_user[_0xd21dx7][_0x6936[107]], stypeTop)
            }
        }
    },
    createPreviewBounds: function (_0xd21dx11, _0xd21dx12, _0xd21dx13, _0xd21dx14) {
        var _0xd21dx15 = game[_0x6936[39]][_0x6936[41]];
        var _0xd21dx16 = _0xd21dx15[_0x6936[112]][_0x6936[111]];
        customBounds[_0x6936[113]] = new p2.Body({
            mass: 0,
            position: [_0xd21dx15[_0x6936[114]](_0xd21dx11), _0xd21dx15[_0x6936[114]](_0xd21dx12)],
            angle: 1.5707963267948966
        });
        customBounds[_0x6936[113]][_0x6936[115]](new p2.Plane());
        customBounds[_0x6936[116]] = new p2.Body({
            mass: 0,
            position: [_0xd21dx15[_0x6936[114]](_0xd21dx11 + _0xd21dx13), _0xd21dx15[_0x6936[114]](_0xd21dx12)],
            angle: -1.5707963267948966
        });
        customBounds[_0x6936[116]][_0x6936[115]](new p2.Plane());
        customBounds[_0x6936[105]] = new p2.Body({
            mass: 0,
            position: [_0xd21dx15[_0x6936[114]](_0xd21dx11), _0xd21dx15[_0x6936[114]](_0xd21dx12)],
            angle: -3.141592653589793
        });
        customBounds[_0x6936[105]][_0x6936[115]](new p2.Plane());
        customBounds[_0x6936[117]] = new p2.Body({
            mass: 0,
            position: [_0xd21dx15[_0x6936[114]](_0xd21dx11), _0xd21dx15[_0x6936[114]](_0xd21dx12 + _0xd21dx14)]
        });
        customBounds[_0x6936[117]][_0x6936[115]](new p2.Plane());
        _0xd21dx15[_0x6936[36]][_0x6936[118]](customBounds[_0x6936[113]]);
        _0xd21dx15[_0x6936[36]][_0x6936[118]](customBounds[_0x6936[116]]);
        _0xd21dx15[_0x6936[36]][_0x6936[118]](customBounds[_0x6936[105]]);
        _0xd21dx15[_0x6936[36]][_0x6936[118]](customBounds[_0x6936[117]])
    },
    checkVeg: function (_0xd21dx17, _0xd21dx18) {
        if (_0xd21dx17[_0x6936[60]][_0x6936[119]] == _0x6936[78] && _0xd21dx18[_0x6936[60]][_0x6936[119]] == _0x6936[78]) {
            return false
        };
        if (_0xd21dx17[_0x6936[60]][_0x6936[119]] == _0x6936[85] || _0xd21dx18[_0x6936[60]][_0x6936[119]] == _0x6936[85]) {
            return true
        };
        if (_0xd21dx17[_0x6936[60]][_0x6936[61]] != _0x6936[62]) {
            this.CollectItem(_0xd21dx17[_0x6936[60]])
        };
        if (_0xd21dx18[_0x6936[60]][_0x6936[61]] != _0x6936[62]) {
            this.CollectItem(_0xd21dx18[_0x6936[60]])
        };
        return true
    },
    update: function () {
        if (this[_0x6936[18]] || !this[_0x6936[17]]) {
            this[_0x6936[59]][_0x6936[71]][_0x6936[120]][_0x6936[54]] = 0;
            this[_0x6936[59]][_0x6936[71]][_0x6936[120]][_0x6936[55]] = 0;
            for (var _0xd21dx7 = 0; _0xd21dx7 < this[_0x6936[23]][_0x6936[77]]; _0xd21dx7++) {
                this[_0x6936[23]][_0xd21dx7][_0x6936[71]][_0x6936[120]][_0x6936[55]] = 0
            };
            return
        };
        if (this[_0x6936[59]][_0x6936[55]] >= 650) {
            this[_0x6936[102]][_0x6936[104]] = true;
            this[_0x6936[103]][_0x6936[104]] = true
        } else {
            this[_0x6936[102]][_0x6936[104]] = false;
            this[_0x6936[103]][_0x6936[104]] = false
        };
        this[_0x6936[50]][_0x6936[121]][_0x6936[55]] += this[_0x6936[13]] * this[_0x6936[14]];
        if (!game[_0x6936[123]][_0x6936[122]] || game[_0x6936[123]][_0x6936[124]] || game[_0x6936[123]][_0x6936[125]] || game[_0x6936[123]][_0x6936[126]] || game[_0x6936[123]][_0x6936[127]]) {
            if (game[_0x6936[39]][_0x6936[130]][_0x6936[129]](this[_0x6936[59]], game[_0x6936[49]][_0x6936[128]]) > 8) {
                game[_0x6936[39]][_0x6936[130]][_0x6936[131]](this[_0x6936[59]], this[_0x6936[16]])
            } else {
                this[_0x6936[59]][_0x6936[71]][_0x6936[120]][_0x6936[132]](0)
            }
        } else {
            this[_0x6936[59]][_0x6936[71]][_0x6936[120]][_0x6936[54]] = 0;
            this[_0x6936[59]][_0x6936[71]][_0x6936[120]][_0x6936[55]] = 0;
            if (this[_0x6936[46]][_0x6936[113]][_0x6936[133]]) {
                this[_0x6936[59]][_0x6936[71]][_0x6936[120]][_0x6936[54]] = -this[_0x6936[16]]
            } else {
                if (this[_0x6936[46]][_0x6936[116]][_0x6936[133]]) {
                    this[_0x6936[59]][_0x6936[71]][_0x6936[120]][_0x6936[54]] = this[_0x6936[16]]
                }
            };
            if (this[_0x6936[46]][_0x6936[134]][_0x6936[133]]) {
                this[_0x6936[59]][_0x6936[71]][_0x6936[120]][_0x6936[55]] = -this[_0x6936[16]]
            } else {
                if (this[_0x6936[46]][_0x6936[135]][_0x6936[133]]) {
                    this[_0x6936[59]][_0x6936[71]][_0x6936[120]][_0x6936[55]] = this[_0x6936[16]]
                }
            };
            if (this[_0x6936[59]][_0x6936[54]] > w) {
                this[_0x6936[59]][_0x6936[54]] = w
            } else {
                if (this[_0x6936[59]][_0x6936[54]] < 0) {
                    this[_0x6936[59]][_0x6936[54]] = 0
                }
            };
            if (this[_0x6936[59]][_0x6936[55]] > h) {
                this[_0x6936[59]][_0x6936[55]] = h
            } else {
                if (this[_0x6936[59]][_0x6936[55]] < 0) {
                    this[_0x6936[59]][_0x6936[55]] = 0
                }
            }
        };
        if (game[_0x6936[44]][_0x6936[136]] > this[_0x6936[19]]) {
            this.GenerateItem()
        };
        for (var _0xd21dx7 = 0; _0xd21dx7 < this[_0x6936[23]][_0x6936[77]]; _0xd21dx7++) {
            this[_0x6936[23]][_0xd21dx7][_0x6936[71]][_0x6936[120]][_0x6936[55]] = this[_0x6936[11]] * this[_0x6936[14]];
            if (this[_0x6936[23]][_0xd21dx7][_0x6936[55]] >= 613) {
                this[_0x6936[23]][_0xd21dx7][_0x6936[82]]()
            }
        };
        for (var _0xd21dx7 = 0; _0xd21dx7 < this[_0x6936[29]][_0x6936[77]]; _0xd21dx7++) {
            this[_0x6936[29]][_0xd21dx7][_0x6936[71]][_0x6936[120]][_0x6936[55]] = this[_0x6936[12]] * this[_0x6936[14]]
        }
    },
    updateTimeBar: function (_0xd21dx19, _0xd21dx1a) {
        game[_0x6936[138]][_0x6936[137]](this[_0x6936[9]]);
        if (_0xd21dx1a == 1) {
            this[_0x6936[139]][_0x6936[56]] += (this[_0x6936[22]] / this[_0x6936[20]]) * this[_0x6936[34]]
        } else {
            if (_0xd21dx1a == -1) {
                this[_0x6936[139]][_0x6936[56]] -= (this[_0x6936[22]] / this[_0x6936[20]]) * this[_0x6936[34]]
            } else {
                this[_0x6936[139]][_0x6936[56]] = this[_0x6936[34]]
            }
        };
        this[_0x6936[9]] = this[_0x6936[143]][_0x6936[53]][_0x6936[142]](this[_0x6936[139]])[_0x6936[141]]({
            width: 0
        }, _0xd21dx19 * 1000, _0x6936[140]);
        this[_0x6936[9]][_0x6936[144]]()
    },
    CollectItem: function (_0xd21dxa) {
        if (this[_0x6936[18]]) {
            return
        };
        sfx_eat[_0x6936[68]]();
        var _0xd21dx1b;
        var _0xd21dx1c = true;
        this[_0x6936[26]][_0xd21dxa[_0x6936[146]][_0x6936[145]]]++;
        this[_0x6936[10]] += data_item[_0xd21dxa[_0x6936[146]][_0x6936[145]]][_0x6936[90]];
        switch (_0xd21dxa[_0x6936[146]][_0x6936[145]]) {
        case 0:
            this[_0x6936[147]](data_item[0][_0x6936[90]], _0xd21dxa[_0x6936[54]] - 15, _0xd21dxa[_0x6936[55]] - 20, styleEffect);
            break;
        case 1:
            this[_0x6936[147]](data_item[1][_0x6936[90]], _0xd21dxa[_0x6936[54]] - 15, _0xd21dxa[_0x6936[55]] - 20, styleEffect);
            break;
        case 2:
            this[_0x6936[147]](data_item[2][_0x6936[90]], _0xd21dxa[_0x6936[54]] - 15, _0xd21dxa[_0x6936[55]] - 20, styleEffect);
            break;
        case 3:
            this[_0x6936[147]](data_item[3][_0x6936[90]], _0xd21dxa[_0x6936[54]] - 15, _0xd21dxa[_0x6936[55]] - 20, styleEffect);
            break;
        case 4:
            this[_0x6936[147]](data_item[4][_0x6936[90]], _0xd21dxa[_0x6936[54]] - 15, _0xd21dxa[_0x6936[55]] - 20, styleEffect);
            break;
        case 5:
            this[_0x6936[147]](data_item[5][_0x6936[90]], _0xd21dxa[_0x6936[54]] - 15, _0xd21dxa[_0x6936[55]] - 20, styleEffect);
            break;
        case 6:
            this[_0x6936[147]](data_item[6][_0x6936[90]], _0xd21dxa[_0x6936[54]] - 15, _0xd21dxa[_0x6936[55]] - 20, styleEffect);
            break;
        case 7:
            this[_0x6936[147]](data_item[7][_0x6936[90]], _0xd21dxa[_0x6936[54]] - 15, _0xd21dxa[_0x6936[55]] - 20, styleEffect);
            break;
        case 8:
            this[_0x6936[147]](data_item[8][_0x6936[90]], _0xd21dxa[_0x6936[54]] - 15, _0xd21dxa[_0x6936[55]] - 20, styleEffect);
            break;
        case 9:
            this[_0x6936[147]](data_item[9][_0x6936[90]], _0xd21dxa[_0x6936[54]] - 15, _0xd21dxa[_0x6936[55]] - 20, styleEffect);
        case 10:
            this[_0x6936[147]](data_item[10][_0x6936[90]], _0xd21dxa[_0x6936[54]] - 15, _0xd21dxa[_0x6936[55]] - 20, styleEffect);
            break;
        case 11:
            this[_0x6936[147]](data_item[11][_0x6936[90]], _0xd21dxa[_0x6936[54]] - 15, _0xd21dxa[_0x6936[55]] - 20, styleEffect);
            break;
        case 12:
            this[_0x6936[147]](data_item[12][_0x6936[90]], _0xd21dxa[_0x6936[54]] - 15, _0xd21dxa[_0x6936[55]] - 20, styleEffect);
            break;
        case 13:
            _0xd21dx1b = _0x6936[148] + this[_0x6936[22]] + _0x6936[149];
            this[_0x6936[147]](_0xd21dx1b, _0xd21dxa[_0x6936[54]] - 15, _0xd21dxa[_0x6936[55]] - 20, styleEffect);
            this[_0x6936[21]] += this[_0x6936[22]];
            if (this[_0x6936[21]] > this[_0x6936[20]]) {
                this[_0x6936[21]] = this[_0x6936[20]];
                this[_0x6936[150]](this[_0x6936[21]], 0)
            } else {
                this[_0x6936[150]](this[_0x6936[21]], 1)
            };
            break;
        case 14:
            _0xd21dx1b = _0x6936[151] + this[_0x6936[22]] + _0x6936[149];
            this[_0x6936[147]](_0xd21dx1b, _0xd21dxa[_0x6936[54]] - 15, _0xd21dxa[_0x6936[55]] - 20, styleEffect);
            this[_0x6936[21]] -= this[_0x6936[22]];
            if (this[_0x6936[21]] <= 0) {
                this[_0x6936[139]][_0x6936[56]] = 0;
                game[_0x6936[138]][_0x6936[137]](this[_0x6936[9]]);
                this.Gameover()
            } else {
                this[_0x6936[150]](this[_0x6936[21]], -1)
            };
            _0xd21dx1c = false;
            break
        };
        this[_0x6936[91]][_0x6936[94]] = this[_0x6936[10]];
        _0xd21dxa[_0x6936[82]]();
        this[_0x6936[152]](_0xd21dxa[_0x6936[54]] + 10, _0xd21dxa[_0x6936[55]] + 50, _0xd21dx1c)
    },
    effectScore: function (_0xd21dx1d, _0xd21dx11, _0xd21dx12, _0xd21dx1e) {
        var _0xd21dx1f = game[_0x6936[53]][_0x6936[94]](_0xd21dx11, _0xd21dx12, _0xd21dx1d, _0xd21dx1e);
        var _0xd21dx20 = game[_0x6936[53]][_0x6936[142]](_0xd21dx1f)[_0x6936[141]]({
            y: _0xd21dx12 - 50,
            alpha: 0
        }, 600, _0x6936[153], true)
    },
    updateCurrentTime: function () {
        this[_0x6936[21]]--;
        if (this[_0x6936[21]] <= 0) {
            game[_0x6936[44]][_0x6936[155]][_0x6936[137]](this[_0x6936[154]]);
            this.Gameover();
            return
        };
        if (this[_0x6936[14]] < this[_0x6936[15]]) {
            this[_0x6936[14]] += 1 / this[_0x6936[20]]
        }
    },
    Gameover: function () {
        if (this[_0x6936[18]]) {
            return true
        };
        this[_0x6936[18]] = true;
        this.ShowResult()
    },
    effectStar: function (_0xd21dx11, _0xd21dx12, _0xd21dx21) {
        var _0xd21dx1f;
        if (_0xd21dx21) {
            _0xd21dx1f = game[_0x6936[53]][_0x6936[60]](_0xd21dx11, _0xd21dx12, _0x6936[156])
        } else {
            _0xd21dx1f = game[_0x6936[53]][_0x6936[60]](_0xd21dx11, _0xd21dx12, _0x6936[157])
        };
        _0xd21dx1f[_0x6936[64]][_0x6936[63]](0.5);
        _0xd21dx1f[_0x6936[158]][_0x6936[63]](0.5);
        game[_0x6936[53]][_0x6936[142]](_0xd21dx1f)[_0x6936[141]]({
            alpha: 0
        }, 200, _0x6936[153], true);
        game[_0x6936[53]][_0x6936[142]](_0xd21dx1f[_0x6936[158]])[_0x6936[141]]({
            x: 1,
            y: 1
        }, 200, _0x6936[153], true)
    },
    ShowResult: function () {
        game[_0x6936[53]][_0x6936[60]](0, 0, _0x6936[159]);
        var _0xd21dx22 = game[_0x6936[53]][_0x6936[60]](w / 2, h / 2 - 20, _0x6936[160]);
        _0xd21dx22[_0x6936[64]][_0x6936[63]](0.5, 0.5);
        var _0xd21dx1e = {
            font: _0x6936[161],
            align: _0x6936[3]
        };
        for (var _0xd21dx7 = 0; _0xd21dx7 < 10; _0xd21dx7++) {
            if (_0xd21dx7 < 4) {
                var _0xd21dx23 = game[_0x6936[53]][_0x6936[94]](w / 2 - 130 + 90 * _0xd21dx7, h / 2 - 100, this[_0x6936[26]][_0xd21dx7] + _0x6936[162] + data_item[_0xd21dx7][_0x6936[90]], styleResult);
                _0xd21dx23[_0x6936[64]][_0x6936[63]](0.5, 0.5)
            } else {
                if (_0xd21dx7 < 8) {
                    var _0xd21dx23 = game[_0x6936[53]][_0x6936[94]](w / 2 - 130 + 90 * (_0xd21dx7 - 4), h / 2 + 15, this[_0x6936[26]][_0xd21dx7] + _0x6936[162] + data_item[_0xd21dx7][_0x6936[90]], styleResult);
                    _0xd21dx23[_0x6936[64]][_0x6936[63]](0.5, 0.5)
                } else {
                    var _0xd21dx23 = game[_0x6936[53]][_0x6936[94]](w / 2 - 40 + 90 * (_0xd21dx7 - 8), h / 2 + 130, _0x6936[108], styleResult);
                    _0xd21dx23[_0x6936[64]][_0x6936[63]](0.5, 0.5);
                    if (_0xd21dx7 == 8) {
                        var _0xd21dx10 = this[_0x6936[26]][8] + this[_0x6936[26]][9] + this[_0x6936[26]][10] + this[_0x6936[26]][11];
                        _0xd21dx23[_0x6936[94]] = _0xd21dx10 + _0x6936[162] + data_item[8][_0x6936[90]]
                    } else {
                        _0xd21dx23[_0x6936[94]] = this[_0x6936[26]][12] + _0x6936[162] + data_item[12][_0x6936[90]]
                    }
                }
            }
        };
        var _0xd21dx24 = game[_0x6936[53]][_0x6936[94]](w / 2 + 5, 500, this[_0x6936[10]], _0xd21dx1e);
        this[_0x6936[163]] = game[_0x6936[53]][_0x6936[164]](w / 2, h - 40, _0x6936[163], this.OnContinue, this);
        this[_0x6936[163]][_0x6936[64]][_0x6936[63]](0.5, 0.5);
        state_animation = 0;
        game[_0x6936[101]][_0x6936[100]][_0x6936[99]][_0x6936[98]]()
    },
    OnContinue: function () {
        sfx_click[_0x6936[68]]();
        SubmitScore(this[_0x6936[10]], 2, this[_0x6936[26]])
    },
    GenerateItem: function () {
        if (!this[_0x6936[165]]()) {
            this[_0x6936[19]] = game[_0x6936[44]][_0x6936[136]] + 30000;
            return
        };
        var _0xd21dx10 = game[_0x6936[167]][_0x6936[166]](0, 100);
        if (_0xd21dx10 < 30) {
            var _0xd21dxb = this[_0x6936[168]](game[_0x6936[167]][_0x6936[166]](w / 2 - 100, w / 2 + 100), -30, 1);
            if (_0xd21dxb) {
                this[_0x6936[29]][_0x6936[83]](_0xd21dxb)
            }
        } else {
            var _0xd21dx25;
            do {
                _0xd21dx25 = game[_0x6936[167]][_0x6936[166]](0, data_item[_0x6936[77]] - 1)
            } while (this[_0x6936[25]][_0xd21dx25] >= data_item[_0xd21dx25][_0x6936[169]] - 1);;
            this[_0x6936[25]][_0xd21dx25]++;
            var _0xd21dxa = this[_0x6936[170]](game[_0x6936[167]][_0x6936[166]](w / 2 - 300, w / 2 + 300), -30, _0xd21dx25, 1);
            if (_0xd21dxa) {
                this[_0x6936[23]][_0x6936[83]](_0xd21dxa);
                if (this[_0x6936[23]][_0x6936[77]] <= 1) {
                    this[_0x6936[171]]()
                }
            }
        };
        var _0xd21dx10 = game[_0x6936[167]][_0x6936[166]](300 / this[_0x6936[14]], 500 / this[_0x6936[14]]);
        this[_0x6936[19]] = game[_0x6936[44]][_0x6936[136]] + _0xd21dx10
    },
    checkExist: function () {
        for (var _0xd21dx7 = 0; _0xd21dx7 < data_item[_0x6936[77]]; _0xd21dx7++) {
            if (this[_0x6936[25]][_0xd21dx7] < data_item[_0xd21dx7][_0x6936[169]] - 1) {
                return true
            }
        };
        return false
    },
    addItem: function (_0xd21dx11, _0xd21dx12, _0xd21dx26, _0xd21dx1a) {
        var _0xd21dxa;
        if (_0xd21dx1a === 1) {
            for (var _0xd21dx7 = 0; _0xd21dx7 < this[_0x6936[28]][_0xd21dx26][_0x6936[77]]; _0xd21dx7++) {
                if (!this[_0x6936[28]][_0xd21dx26][_0xd21dx7][_0x6936[172]]) {
                    _0xd21dxa = this[_0x6936[28]][_0xd21dx26][_0xd21dx7];
                    _0xd21dxa[_0x6936[173]](_0xd21dx11, _0xd21dx12);
                    return _0xd21dxa
                }
            }
        };
        return false
    },
    addStone: function (_0xd21dx11, _0xd21dx12, _0xd21dx1a) {
        var _0xd21dxb;
        if (_0xd21dx1a === 1) {
            for (var _0xd21dx7 = 0; _0xd21dx7 < this[_0x6936[30]][_0x6936[77]]; _0xd21dx7++) {
                if (!this[_0x6936[30]][_0xd21dx7][_0x6936[172]]) {
                    _0xd21dxb = this[_0x6936[30]][_0xd21dx7];
                    _0xd21dxb[_0x6936[173]](_0xd21dx11, _0xd21dx12);
                    return _0xd21dxb
                }
            }
        };
        return false
    },
    initGame: function () {
        this[_0x6936[17]] = true;
        this[_0x6936[18]] = false;
        this[_0x6936[21]] = this[_0x6936[20]];
        this[_0x6936[154]] = game[_0x6936[44]][_0x6936[155]][_0x6936[176]](Phaser[_0x6936[174]].SECOND, this[_0x6936[175]], this);
        var _0xd21dx27 = game[_0x6936[53]][_0x6936[60]](w / 2, h - 20, _0x6936[177]);
        _0xd21dx27[_0x6936[64]][_0x6936[63]](0.5);
        this[_0x6936[139]] = game[_0x6936[53]][_0x6936[60]](0, h - 32.5, _0x6936[139]);
        this[_0x6936[139]][_0x6936[54]] = w / 2 - this[_0x6936[139]][_0x6936[56]] / 2;
        this[_0x6936[34]] = this[_0x6936[139]][_0x6936[56]];
        this[_0x6936[150]](this[_0x6936[20]], 0)
    },
    itemAnimation: function () {
        if (this[_0x6936[23]][_0x6936[77]] <= 0) {
            return
        };
        var _0xd21dx28 = 0;
        var _0xd21dx29 = 0;
        var _0xd21dx2a;
        if (this[_0x6936[31]] == 0) {
            _0xd21dx28 = 50;
            _0xd21dx29 = 0.1;
            this[_0x6936[31]] = 1
        } else {
            _0xd21dx28 = -50;
            _0xd21dx29 = -0.1;
            this[_0x6936[31]] = 0
        };
        _0xd21dx2a = this[_0x6936[143]][_0x6936[53]][_0x6936[142]](this[_0x6936[23]][0][_0x6936[158]])[_0x6936[141]]({
            x: this[_0x6936[23]][0][_0x6936[158]][_0x6936[54]] + _0xd21dx29,
            y: this[_0x6936[23]][0][_0x6936[158]][_0x6936[55]] + _0xd21dx29
        }, 1000, _0x6936[140]);
        _0xd21dx2a[_0x6936[144]]();
        for (var _0xd21dx7 = 1; _0xd21dx7 < this[_0x6936[23]][_0x6936[77]]; _0xd21dx7++) {
            var _0xd21dx2b = this[_0x6936[143]][_0x6936[53]][_0x6936[142]](this[_0x6936[23]][_0xd21dx7][_0x6936[158]])[_0x6936[141]]({
                x: this[_0x6936[23]][_0xd21dx7][_0x6936[158]][_0x6936[54]] + _0xd21dx29,
                y: this[_0x6936[23]][_0xd21dx7][_0x6936[158]][_0x6936[55]] + _0xd21dx29
            }, 1000, _0x6936[140]);
            _0xd21dx2b[_0x6936[144]]()
        };
        _0xd21dx2a[_0x6936[178]][_0x6936[53]](this[_0x6936[171]], this)
    },
    btnAnimation: function () {
        var _0xd21dx2c = 0;
        var _0xd21dx2d = 0;
        switch (state_animation) {
        case 0:
            _0xd21dx2c = 0;
            _0xd21dx2d = 0;
            state_animation++;
            game[_0x6936[44]][_0x6936[155]][_0x6936[53]](1500, this[_0x6936[179]], this);
            break;
        case 1:
            _0xd21dx2c = 15;
            _0xd21dx2d = 100;
            state_animation++;
            break;
        case 2:
            _0xd21dx2c = -15;
            _0xd21dx2d = 200;
            state_animation++;
            break;
        case 3:
            _0xd21dx2c = 10;
            _0xd21dx2d = 100;
            state_animation++;
            break;
        case 4:
            _0xd21dx2c = -10;
            _0xd21dx2d = 70;
            state_animation++;
            break;
        case 5:
            _0xd21dx2c = 0;
            _0xd21dx2d = 50;
            state_animation = 0;
            break
        };
        if (state_animation != 1) {
            var _0xd21dx20 = this[_0x6936[143]][_0x6936[53]][_0x6936[142]](this[_0x6936[163]])[_0x6936[141]]({
                angle: _0xd21dx2c
            }, _0xd21dx2d, _0x6936[140]);
            _0xd21dx20[_0x6936[178]][_0x6936[53]](this[_0x6936[179]], this);
            _0xd21dx20[_0x6936[144]]()
        }
    }
}
              
            
!
999px

Console