Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ig.module(
- 'game.entities.SavePoint'
- )
- .requires(
- 'impact.entity'
- )
- .defines(function() {
- EntitySavePoint = ig.Entity.extend({
- collides: ig.Entity.COLLIDES.FIXED,
- type : ig.Entity.TYPE.B,
- checkAgainst : ig.Entity.TYPE.A,
- size: {x: 16, y: 10},
- // Load an animation sheet
- animSheet: new ig.AnimationSheet('media/save_point.png', 16, 16),
- init: function(x, y, settings) {
- this.parent(x, y, settings);
- this.anims.idle = new ig.Animation(this.animSheet, 1, [0]);
- },
- update: function() {
- // This method is called for every frame on each entity.
- // React to input, or compute the entity's AI here.
- this.currentAnim = this.anims.idle;
- // Call the parent update() method to move the entity
- // according to its physics
- this.parent();
- },
- check : function(other){
- this.kill;
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement