複数のactivityを使用するのではなく複数のscenesを使用したいのであれば、Sceneの管理は本当に重要です。きっと有用な知識となるでしょう。
Scenes management:Scene management is really important thing, since probably you will want to use multiple scenes, instead of multiple activities, it might be useful knowledge. |
mEngine.setScene(scene);
別のSceneへ切り替わる時に、 engine は前sceneの更新を停止します。
1. Switching scene:To switch between scenes, you simply have to call this method:
mEngine.setScene(scene);
While switching to different scene, engine will stop updating previous one. |
scene.setChildScene(differentScene);
子sceneを設定した後にscene を更新するかどうかを決めなければいけない場合、以下パラメータを設定して同名のメソッドを使用する必要があります。:
setChildScene(pChildScene, pModalDraw, pModalUpdate, pModalTouch)
2. Setting Child Scene:You can set child scene to different scene, by calling:
scene.setChildScene(differentScene);
There is also possibility to decide if scene should be updated after setting child scene, you have to use same method, but with those parameters:
setChildScene(pChildScene, pModalDraw, pModalUpdate, pModalTouch) |
注意事項
|