• Content count

  • Joined

  • Last visited

About arun

  • Rank

Recent Profile Visitors

231 profile views
  1. code not understood

    Hi friends, I am new in Phaser game development. I don't understand the following code below please help me var gameTitle = function(game){} gameTitle.prototype = { create: function(){
  2. Code not understood

    Hi friends, I am new in Phaser game development. When I followed a tutorial monster wants candy i found the following codes that I don't understand. Please help me. var Candy = {}; Candy.Boot = function(game){}; Candy.Boot.prototype = {
  3. Game Programming Pattern

    Hi friends, I am new in game development with phaser. I am always confused with the programming pattern of development. Which pattern should I follow for better programming. Please help me
  4. Phaser time

    Hi friends, the code below if (this.nextShotAt> is not understood. is indicates the system's clock time or else? fire: function() { if (this.nextShotAt > { return; } if (this.bulletPool.countDead() === 0) { return; } this.nextShotAt = + this.shotDelay
  5. Order of custom function

    dear friends, I am sometimes in trouble while ordering the custom functions. In which order they should be put?
  6. Why use return statement

    Hi friends, please explain me the code below. why we use return here? fire: function() { if (this.nextShotAt > { return; } if (this.bulletPool.countDead() === 0) { return; }
  7. Phaser time

    but, means which time it indicate?
  8. Phaser time

    dear friends, I don't understand the 2 lines of code below. please help me if ( > shootTime) { nut = nuts.getFirstExists(false); }
  9. code for bullet shooting

    hi, i am following phaser tutorial . but, i don't understand the fire: function() code. please help me create: function () { ... this.bullets = []; // Add an empty sprite group into our game this.bulletPool =; // Enable physics to the whole sprite group this.bulletPool.enableBody = true; this.bulletPool.physicsBodyType = Phaser.Physics.ARCADE; // Add 100 'bullet' sprites in the group. // By default this uses the first frame of the sprite sheet and // sets the initial state as non-existing (i.e. killed/dead) this.bulletPool.createMultiple(100, 'bullet'); // Sets anchors of all sprites this.bulletPool.setAll('anchor.x', 0.5); this.bulletPool.setAll('anchor.y', 0.5); // Automatically kill the bullet sprites when they go out of bounds this.bulletPool.setAll('outOfBoundsKill', true); this.bulletPool.setAll('checkWorldBounds', true); this.nextShotAt = 0; fire: function() { if (this.nextShotAt > { return; } if (this.bulletPool.countDead() === 0) { return; } this.nextShotAt = + this.shotDelay; // Find the first dead bullet in the pool var bullet = this.bulletPool.getFirstExists(false); // Reset (revive) the sprite and place it in a new location bullet.reset(this.player.x, this.player.y - 20); bullet.body.velocity.y = -500; },