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(); }
public override void _Ready() { CutsceneVideoPlayer = GetNode <VideoPlayer>("Control/VideoPlayer"); ControlNode = GetNode <Control>("Control"); FrameSize = CutsceneVideoPlayer.RectSize; CutsceneVideoPlayer.Connect("finished", this, nameof(OnFinished)); ControlNode.Hide(); }
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(); }