Jump to content

Loop Changing Background Colour While Game Loading?


ceb
 Share

Recommended Posts

There are some nice features in the Phaser.Color object to allow you to smoothly blend between two colours, for instance you could do something like this:

function loadUpdate() {  var intermedateColor = Phaser.Color.interpolateColor(0xff0000, 0x0000ff, 100, game.load.progress); // get a color between 0xff0000 (red) and 0x0000ff (blue) depending on load progress  game.stage.backgroundColor = intermediateColor;}
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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