
The switch_to_2d()
the function loads a new scene from res://miniGame/titleScreen.tscn
, before finally adding the new scene as a child of the game manager. This function seems to be called when the player charges.
The switch_to_3d()
the function is used to switch the game back to a 3D perspective. It removes the currently active scene from the game manager and then loads a new scene from res://level/Test2.tscn
and adds it as a child of the game manager. If there is a scene called "tutLevel" in the game manager, it sets that as the new active scene instead.
There is also a update_pp()
function which takes in a score
parameter and updates the player's energy using the energy_gain()
function of the node in the player group
The switch to 2d() is intended to be called whenever the player needs to charge(in context the core gameplay element besides mecha combat is fuel management)
Player script

So far it returns the print "mini-game power" from the player's charge button when it tries to call it but the 2d minigame menu screen itself doesn't show up.