Advertisement
papyhardcore

SavePoint.js

Aug 20th, 2014
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ig.module(
  2.         'game.entities.SavePoint'
  3.         )
  4.         .requires(
  5.                 'impact.entity'
  6.                 )
  7.         .defines(function() {
  8.  
  9.  
  10.             EntitySavePoint = ig.Entity.extend({
  11.                 collides: ig.Entity.COLLIDES.FIXED,
  12.                 type : ig.Entity.TYPE.B,
  13.                 checkAgainst : ig.Entity.TYPE.A,
  14.                
  15.                 size: {x: 16, y: 10},
  16.                
  17.                 // Load an animation sheet
  18.                 animSheet: new ig.AnimationSheet('media/save_point.png', 16, 16),
  19.                
  20.                 init: function(x, y, settings) {
  21.  
  22.                     this.parent(x, y, settings);
  23.                     this.anims.idle = new ig.Animation(this.animSheet, 1, [0]);
  24.                    
  25.                 },
  26.                 update: function() {
  27.                     // This method is called for every frame on each entity.
  28.                     // React to input, or compute the entity's AI here.
  29.                     this.currentAnim = this.anims.idle;
  30.  
  31.                    
  32.  
  33.                     // Call the parent update() method to move the entity
  34.                     // according to its physics
  35.                     this.parent();
  36.                 },
  37.  
  38.                 check : function(other){
  39.                     this.kill;
  40.                 }
  41.             });
  42.  
  43.  
  44.         });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement