// Called when the node enters the scene tree for the first time. public override void _Ready() { globale = (Global)GetNode("/root/Global"); // globale.player = this; // cam = (Spatial)GetNode("CamBase"); camerae = (Camera)GetNode(cams[current_camera]); cube = (Spatial)GetNode("cube"); cubeshape = (CollisionShape)GetNode("CollisionShape"); joystick = (Joystick_Button)GetNode("joystick/Joystick_Button"); global_joystick = (Sprite)GetNode("joystick"); bt_jump = (TouchScreenButton)GetNode("TSB_jump"); bt_menu = (TouchScreenButton)GetNode("TSB_menu"); bt_respawn = (TouchScreenButton)GetNode("TSB_respawn"); bt_cam = (TouchScreenButton)GetNode("TSB_cam"); flecheBase = (Spatial)GetNode("FlechBase"); debug = (Label)GetNode("debug"); if (globale.difficulty > 1) { flecheBase.Visible = false; } if (globale.is_mobile()) { } else { global_joystick.Visible = false; global_joystick.SetProcessUnhandledInput(false); bt_jump.Visible = false; bt_jump.SetProcessUnhandledInput(false); bt_menu.Visible = false; bt_menu.SetProcessUnhandledInput(false); bt_respawn.Visible = false; bt_respawn.SetProcessUnhandledInput(false); bt_cam.Visible = false; bt_cam.SetProcessUnhandledInput(false); } if (!globale.respawn) { bt_respawn.Visible = false; bt_respawn.SetProcessUnhandledInput(false); } // spawnpoint = Translation; spawnpoint.y -= 0.05F; // just_jumped = false; // areacol = (Area)GetNode("Area"); // setSkin(globale.skin_id_equipe); // }
public override void _Ready() { secondSkyGradient = (Sprite)GetNode("ControlsBackground"); controlsDesc = (Sprite)GetNode("ControlsDesc"); play = (TextureButton)GetNode("Play"); controls = (TextureButton)GetNode("Controls"); quit = (TextureButton)GetNode("Quit"); startScene = (AnimationPlayer)GetNode("StartScene"); controlsQuit = (TouchScreenButton)GetNode("ControlsBack"); GameData.currentMap = this; }