rocus

Members
  • Content count

    2
  • Joined

  • Last visited

About rocus

  • Rank
    Newbie

Profile Information

  • Gender
    Not Telling
  1. rocus

    Need help on my 1st game

    Hi there To extend a Phaser class, for example Phaser.Sprite, you can use prototype method. Roughly like the example below class_name = function(x, y, key, frame){ Phaser.Sprite.call(game, x, y, key, frame); game.world.add(this) this.inputEnabled = true; this.events.onTouchDown.add(this.onInputDown, this);}; class_name.prototype = Object.create(Phaser.Sprite.prototype);class_name.prototype.constructor = class_name;class_name.prototype.update = function() {};class_name.prototype.onTouchDown = function(item, pointer) {};And simply use it like var myClassInstance = new class_name(x, y, "sprite sheet key", "frame key");
  2. Hi guys, I'm new here sorry for my grammar in advance So I just recently bought Box2D plugin and after looking at the examples I'm curious what's the best way to create a soft body like the one on http://agar.io (that ripple effect when 2 or more blobs collides each other) ? Right now my best guess is to port the Emanuele's Flash Box2D tutorial from here : http://www.emanueleferonato.com/2012/09/21/step-by-step-creation-of-a-box2d-soft-body-blob/ Thanks guys