Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game.World.prototype.collide = function (a) {
- if(a.collideAgainst != 1 && !window.canDie)
- return false;
- if (!this.collisionGroups[a.collideAgainst]) return;
- var i, b;
- for (i = this.collisionGroups[a.collideAgainst].length - 1; i >= 0; i--) {
- b = this.collisionGroups[a.collideAgainst][i];
- if (a !== b)
- this.solver.solve(a, b);
- }
- }
- function toggleInvincible() {
- window.canDie = !window.canDie;
- jQuery(".invincible").text(!window.canDie ? "Disable Hack" : "Enable Hack");
- }
- jQuery(".game").append("<div style='position: absolute; left: calc(50% - 170px); top: 0'><a onclick='toggleInvincible()' class='invincible'>Toggle Invincible</a></div>");
- for(var i = 0; i < 2; i++)
- toggleInvincible();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement