public override void _Ready()
        {
            base._Ready();
            videoPlayer = GetNode <VideoPlayer>(videoPlayerNodePath);
            videoPlayer.Connect("finished", this, nameof(OnVideoFinished));
            skipButton = GetNode <Button>(skipButtonNodePath);
            skipButton.Connect("pressed", this, nameof(OnSkipPressed));

            videoPlayer.Play();
        }
Example #2
0
    public override void _Ready()
    {
        CutsceneVideoPlayer = GetNode <VideoPlayer>("Control/VideoPlayer");
        ControlNode         = GetNode <Control>("Control");

        FrameSize = CutsceneVideoPlayer.RectSize;

        CutsceneVideoPlayer.Connect("finished", this, nameof(OnFinished));

        ControlNode.Hide();
    }
Example #3
0
    public override void _Ready()
    {
        CutsceneVideoPlayer = GetNode <VideoPlayer>("Control/VideoPlayer");
        ControlNode         = GetNode <Control>("Control");

        FrameSize = CutsceneVideoPlayer.RectSize;

        CutsceneVideoPlayer.Connect("finished", this, nameof(OnFinished));
        GetViewport().Connect("size_changed", this, nameof(OnCutsceneResized));

        // Initially adjust video player frame size
        OnCutsceneResized();

        ControlNode.Hide();
    }