Hello, i have multiple scene, one with my player and another one with all other basic functions, i want to use the lighting effects, i use it like this :
Hi,
Scenes are independant each others, they can communicate data, but a game object created in one scene can’t be displayed in another scene. Your light can’t work in the PlayerScene
I don’t know why you put the player in its own scene, but i don’t think it’s a good idea.
Hello, thank you for your answer, I would like to separate my files as much as possible to avoid having files with too many lines.
For example, a file with the configuration of my player and the movements of the latter to avoid having to put everything back in each different scene,
Here’s how i do:
I use multiple scene, but only one GameScene, others scenes are for hud, map, menu, game over, …
I use multiple files, a Player Class file that handle the player.
For each enemies, a enemy class that extends an Enemy class file.
And i use multiple Service class files with static methods to not overload the scene file (LayerService, CameraService, ColliderService, …)
I don’t use multiple scene per level, i just have a LevelService that destroy everything, and load the next map, add layers, add enemies, …