Jump to content

Phaser 2.4 Release Candidate 2


rich
 Share

Recommended Posts

It will take me some debugging time to figure out which image is causing the problem.  Time that I don't have yet.

 

The problems are happening in Standard Chrome as well, I just checked.

 

Here is all my sound loading code, from Preloader.js (GNS stands for global namespace, an object in a separate file, loaded ahead in the browser):

 

   ///// load all game sounds ///
         
   this.load.audio('initialize', 'audio/initialize.wav');
   this.load.audio('click', 'audio/click.wav');
   this.load.audio('start_game', 'audio/start_game.wav');
   this.load.audio('attach', 'audio/ring_contact1.wav');
   this.load.audio('collide_balls', 'audio/collision-failed.wav');
   this.load.audio('explode_bomb','audio/explode_bomb.wav');
   this.load.audio('tick_tock', 'audio/tick_tock.wav');
   this.load.audio('tick_tock1', 'audio/tick_tock1.wav');
   this.load.audio('tick_tock2', 'audio/tick_tock2.wav');
   this.load.audio('tick_tock3', 'audio/tick_tock3.wav');
   this.load.audio('start_ball', 'audio/ball_launch.wav');
   this.load.audio('level_succeeded', 'audio/level_up.wav');
   this.load.audio('level_failed', 'audio/crack.wav');
   this.load.audio('target_hit', 'audio/get_bonus.wav');
   this.load.audio('target_defuse', 'audio/defuse.wav');
   this.load.audio('convert_to_target', 'audio/ball_to_stars3.wav');
   this.load.audio('shoot_gun1', 'audio/shoot_star1.wav');
   this.load.audio('shoot_gun2', 'audio/shoot_star2.wav');
   
    // cache them for global access and to avoid the need to destroy them (and possibly invoke gc) upon stage shutdowns
    GNS.initializeSound = this.game.add.audio('initialize'); // a short silent sound to prime the mobile sound pump
    GNS.clickSound = this.game.add.audio('click');
    GNS.startGameSound = this.game.add.audio('start_game');
    GNS.startBallSound = this.game.add.audio('start_ball');
    GNS.attachBallSound = this.game.add.audio('attach');
    GNS.collideBallsSound = this.game.add.audio('collide_balls');
    GNS.bombExplodeSound = this.game.add.audio('explode_bomb');
    GNS.levelTimeWarningSound = this.game.add.audio('tick_tock');
    GNS.bombTickTockSound1 = this.game.add.audio('tick_tock1');
    GNS.bombTickTockSound2 = this.game.add.audio('tick_tock2');
    GNS.bombTickTockSound3 = this.game.add.audio('tick_tock3');
    GNS.levelSucceededSound = this.game.add.audio('level_succeeded');
    GNS.levelFailedSound = this.game.add.audio('level_failed');
    GNS.targetHitSound = this.game.add.audio('target_hit');
    GNS.targetDefuseSound = this.game.add.audio('target_defuse');
    GNS.convertToTargetSound = this.game.add.audio('convert_to_target');
    GNS.shoot1Sound = this.game.add.audio('shoot_gun1');
    GNS.shoot2Sound = this.game.add.audio('shoot_gun2');
Link to comment
Share on other sites

now that 

game.input.mouse.button

is depreciated, what is the new equivalent to this?

I could still use

game.input.mousePointer.button

but the changelog says to use the pointer object instead.

But im overstrayed, since there are like 10 pointer objects

plus the pointers array. which one should i use?

Link to comment
Share on other sites

Depends what you're doing (or rather where you are doing it) - if it's in an event callback like onInputDown, then use the pointer that is passed in (pointer.button), otherwise you could use Input.activePointer, which is always the most currently used pointer.

Link to comment
Share on other sites

  • 1 month later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...