"Build a Blog Reader Android App" was retired on April 1, 2015. You are now viewing the recommended replacement.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Game Development with Phaser!
You have completed Game Development with Phaser!
Learn how to organize your code into modular components called prefabs, that can be easily reused and maintained, improving overall code structure of our game.
Solution code:
const gameOverTitle = this.add.text(
1920 / 2,
840,
'GAME OVER',
{
fontSize: '100px',
fontStyle: 'bold',
},
).setOrigin(0.5, 0).setScrollFactor(0);
gameOverTitle.alpha = 0;
const gameOverTitleFadeIn = this.tweens.add({
targets: gameOverTitle,
alpha: 1,
y: 300,
duration: 200,
paused: true,
});
const gameOverText = this.add.text(
1920 / 2,
540,
'Press R to restart',
{
fontSize: '50px',
fontStyle: 'bold',
},
).setOrigin(0.5, 0).setScrollFactor(0);
gameOverText.alpha = 0;
const gameOverTextFadeIn = this.tweens.add({
targets: gameOverText,
alpha: 1,
duration: 200,
delay: 200,
paused: true,
});
Resources
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up