Last active
August 29, 2015 14:18
-
-
Save rezoner/f5c1f476329a73c8b895 to your computer and use it in GitHub Desktop.
save screen in playground.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This will make you a screenshot for later usage whenever you want */ | |
ENGINE.Game = { | |
showOptionsScreen: function() { | |
app.screenshot = this.app.layer.cache(); | |
app.setState(ENGINE.Options); | |
} | |
}; | |
/* | |
anytime later in the code | |
use screenshot for cool transitional effects | |
involving previous screen | |
or displaying previous screen as a background of current menu | |
*/ | |
app.layer.drawImage(app.screenshot, 0, 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment