Snippet location: Scene > Game Flow
Function, reload with one transition.
code for Stencyl 4.0 or later
location: com.stencyl.behvior.Script
syntax: reloadCurrentScene(null, createCrossfadeTransition(0));
computational shortcut:
level 1: Engine.engine.switchScene(Script.getCurrentScene(),null,createCrossfadeTransition)
No transition: Engine.engine.switchScene(Script.getCurrentScene(),null,null)
The switchScene can also be used to switch scene.
Engine.engine.switchScene(0,null,null) - switch to the first scene created in the project.
No comments:
Post a Comment