This commit is contained in:
2025-07-31 18:00:00 -07:00
parent 2be97ea27c
commit 15f11fc0f3
22 changed files with 725 additions and 516 deletions

View File

@@ -1,7 +1,7 @@
# Cutscene System for Godot 4.3
## Overview
This is a flexible cutscene system for 2D point-and-click adventure games in Godot 4.3. It supports both sequential and parallel action execution, with a focus on extensibility and dynamic behavior.
This is a flexible cutscene system for 2D point-and-click adventure games in Godot 4.3. It supports both sequential and parallel action execution, with a focus on extensibility and dynamic behavior. The system can be used directly with code or with the visual Cutscene Editor plugin that manages cutscene resources.
## Features
- Sequential action execution
@@ -9,6 +9,7 @@ This is a flexible cutscene system for 2D point-and-click adventure games in God
- Extensible action system
- Signal-based completion system
- Error handling and recovery
- Resource-based cutscene management (with Cutscene Editor plugin)
## System Components
@@ -25,7 +26,7 @@ This is a flexible cutscene system for 2D point-and-click adventure games in God
## Usage
### Basic Setup
### Basic Setup (Code-based)
```gdscript
# Create a cutscene manager
var cutscene_manager = CutsceneManager.new()
@@ -39,7 +40,7 @@ cutscene_manager.add_action(DialogueAction.new(character, "Hello, world!"))
cutscene_manager.start()
```
### Parallel Actions
### Parallel Actions (Code-based)
```gdscript
# Create parallel actions
var parallel_actions = [
@@ -49,6 +50,20 @@ var parallel_actions = [
cutscene_manager.add_parallel_actions(parallel_actions)
```
### Resource-based Setup (With Cutscene Editor)
```gdscript
# Load a cutscene resource created with the visual editor
var cutscene_resource = preload("res://path/to/your/cutscene.tscn")
# Generate actions from the resource
var generator = CutsceneGenerator.new()
var cutscene_manager = generator.generate_cutscene(cutscene_resource)
# Add to scene and start
add_child(cutscene_manager)
cutscene_manager.start()
```
### The Example Scenario
The system supports complex sequences like the one described in the requirements: