makotok/Hanappe

Add features

Closed this issue · 4 comments

  1. closeScene (or a new function) that can go up in the scene hierarchy more than one level.
    E.g. I have the game level and a win scene overlayed, and want to go back to the level selection in a scene list that follows:
Level Seleciton -> Level -> Win Menu

Something like closeScene(2, ...) should go back directly to Level Selection.

Another option is to go directly to a named scene, e.g. closeScene("LevelSelection", ...)

  1. Stop touch events from happening to a scene after openScene is called.
    In the case of transitions that don't close the current scene (e.g. popIn), touch events still happen in the old scene.

Consider.
Would respond.

Consider.

During the transition of the scene Should we destroy all the touch event?
For example, touchDown event occurs.
However, touchUp event is discarded.

It's going to be able to respond to some corresponding stop events of the scene.

  1. Add a queue instead of ignoring commands while transitioning.
    E.g.:
flower.closeScene()
flower.closeScene()

Should do what it says instead of ignoring the second close.

Fixed.

There is a reason the design on this point.
closeScene used to close asynchronously basically.
The purpose is to make the animation of the scene.

Therefore, if you want to close in succession,
There is a need to call a function close is complete.

Modified.

flower.closeScene({backScene = "main_scene"}) -- The scene back to the main_scene.
flower.closeScene({backSceneCount = 2}) -- Scene back two.