Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- invulnerable : false,
- isCatched : function (player) {
- if (!this.invulnerable && player.shape.intersect(this.shape)) {
- this.move();
- // Делаем неуязвимой на 500 мс.
- this.makeInvulnerable(500);
- return true;
- }
- return false;
- },
- makeInvulnerable : function (time) {
- this.invulnerable = true;
- (function () {
- this.invulnerable = false;
- }.bind(this).delay(time));
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement