public override void _Ready() { _arrow = ResourceLoader.Load("res://Assets/cursor-arrow.png"); _move = ResourceLoader.Load("res://Assets/cursor-move.png"); _drag = ResourceLoader.Load("res://Assets/cursor-drag.png"); _pointingHand = ResourceLoader.Load("res://Assets/cursor-pointinghand.png"); Input.SetCustomMouseCursor(_pointingHand, Input.CursorShape.PointingHand); SetMouseMode(Input.CursorShape.Arrow); _camera = GetNode <DraggableCamera>("../DraggableCamera"); _cameraShake = GetNode <CameraShake>("CameraShake"); var canvas = GetNode <CanvasLayer>("CanvasLayer"); _outOfControlIndicator = canvas.GetNode <Label>("OutOfControl"); GameOverIndicator = canvas.GetNode <Label>("GameOver"); }
public override void _Ready() { _camera = GetNode <DraggableCamera>("DraggableCamera"); _goblin = GetNode <Controllable>("Goblin"); _animationPlayer = GetNode <AnimationPlayer>("AnimationPlayer"); _animationPlayer.Connect("animation_finished", this, nameof(OnAnimationFinished)); _gameManager = GetNode <GameManager>("GameManager"); _exitButton = GetNode <Pickable>("ExitButton"); _exitButton.Connect("OnPickedUp", this, nameof(OnExitButtonPickedUp)); _exit = GetNode <Pickable>("Exit"); _exit.Connect("OnPickedUp", this, nameof(OnExitPickedUp)); _exit.Visible = false; _exit.PickedUp = true; ConnectAllControllables(); }