Jump to content

Search the Community

Showing results for tags '2.7.3'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 2 results

  1. I've recently been coding an infinite runner game in which the player is allowed to attack freely as they encounter obstacles and enemies. this being said, there is various objects that use collisions and physics bodies for collision detection and i have tried everything i have found to render the debug boxes to no avail. Attack = function() { Phaser.Sprite.call(this, game, player.x + 15, player.y, 'Attack'); game.add.existing(this); game.physics.enable(this, Phaser.Physics.ARCADE); this.animations.add('attack'); this.animations.play('attack', 8, false, true); this.body.setSize(50, 80, 30, 0); this.body.allowGravity = false; this.body.immovable = true; game.time.events.add(Phaser.Timer.SECOND * attackSpeed, setAttack, this); curAtk = this; }; //these set the variable 'Objects' Attack.prototype = Object.create(Phaser.Sprite.prototype); Attack.prototype.constructor = Enemy; //this checks conditions specific for the Attack Object made through the class every update. Attack.prototype.update = function() { this.x = player.x + 15; this.y = player.y; this.game.debug.bodyInfo(this); }; here is specifically the attacking object spawn which spawns the attack object, and on the last line of actual code i try to call the debug information to render. I'm not sure that this is the way to do it, but i have added the "render: render" to my game initialization and tried to call the code in that as well plus using the references within the examples as well and i cannot for the life of me figure out why the body's are not debugging allowing me to fine tune the desired collision areas. Any thoughts or ideas are welcome. if more code is needed of what i have i can upload my JS files. Also a quick note, there are no error messages. and everything runs as expected aside from the debugging aspect and proper hit-box areas.
  2. Hello, I have been using phaser 2.6.2 and this emitter worked fine: var emitter = this.game.add.emitter(hitMeteor.body.x+hitMeteor.body.width/2, hitMeteor.body.y+hitMeteor.body.height/2, 6); emitter.makeParticles('meteorPiece'); emitter.minParticleSpeed.setTo(hitMeteor.body.width/2,-hitMeteor.body.height/2); emitter.maxParticleSpeed.setTo(70,hitMeteor.body.height/2); emitter.gravity = 0; emitter.start(true,1000,null,100); Today I have copied a new version (phaser 2.7.3) and the particles just stay in place rotating like their speed was equal to 0. In the docs I did not find any of those functions deleted so I am not sure what is wrong here. Thanks for all the help! *** OK. Deleting emitter.gravity = 0; helped.
×
×
  • Create New...