Guest User

makeInvulnerable

a guest
Aug 17th, 2010
600
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. invulnerable : false,
  2.  
  3. isCatched : function (player) {
  4.     if (!this.invulnerable && player.shape.intersect(this.shape)) {
  5.         this.move();
  6.         // Делаем неуязвимой на 500 мс.
  7.         this.makeInvulnerable(500);
  8.         return true;
  9.     }
  10.     return false;
  11. },
  12.  
  13. makeInvulnerable : function (time) {
  14.     this.invulnerable = true;
  15.     (function () {
  16.         this.invulnerable = false;
  17.     }.bind(this).delay(time));
  18. },
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×