Skip to content

Commit 46f90c2

Browse files
committed
📖 docs: v3.9.0
1 parent 5f9d908 commit 46f90c2

File tree

3 files changed

+24
-7
lines changed

3 files changed

+24
-7
lines changed

CHANGELOG.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ CHANGELOG
44
UNRELEASED
55
----------
66

7-
* 🐛 fix: #19
7+
3.9.0 (2024-05-22)
8+
------------------
9+
10+
* fix: #19
11+
* feat: added pause and resume functions
12+
813
3.8.0 (2023-11-22)
914
------------------
1015

README.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ Scene Manager v3.X.X is compatible with Godot 4.
1414

1515
**Recently Added**:
1616

17-
* [X] Added a feature to navigate to the scene path in filesystem on godot when clicked on scene address in Scene Manager tool
18-
* [X] Added a feature to open a desired scene from Scene Manager tab
19-
* [X] Users now can have some time to load their scene in the background with the new changing scene functionality
17+
* [X] Pause and Resume functions added
2018

2119
**All**:
2220

@@ -51,6 +49,9 @@ Scene Manager v3.X.X is compatible with Godot 4.
5149
* fade_out_started
5250
* fade_in_finished
5351
* fade_out_finished
52+
* [X] Added a feature to navigate to the scene path in filesystem on godot when clicked on scene address in Scene Manager tool
53+
* [X] Added a feature to open a desired scene from Scene Manager tab
54+
* [X] Users now can have some time to load their scene in the background with the new changing scene functionality
5455

5556
## How To Use?
5657

@@ -158,7 +159,7 @@ func _ready() -> void:
158159
var first_scene_general_options = SceneManager.create_general_options(Color(0, 0, 0), 1, false)
159160
SceneManager.show_first_scene(fade_in_first_scene_options, first_scene_general_options)
160161
# code breaks if scene is not recognizable
161-
SceneManager.validate_scene(scene)
162+
SceneManager.validate_scene(scene)
162163
# code breaks if pattern is not recognizable
163164
SceneManager.validate_pattern(fade_out_pattern)
164165
SceneManager.validate_pattern(fade_in_pattern)
@@ -176,6 +177,11 @@ func _on_loading_scene_button_up():
176177
func _on_loading_scene_initialization_button_up():
177178
SceneManager.set_recorded_scene(scene)
178179
SceneManager.change_scene("loading_with_initialization", fade_out_options, fade_in_options, general_options)
180+
181+
func _on_pause_and_resume_button_up():
182+
await SceneManager.pause(fade_out_options, general_options)
183+
await get_tree().create_timer(3).timeout
184+
await SceneManager.resume(fade_in_options, general_options)
179185
```
180186

181187
### Simple Example With Loading Screen
@@ -377,4 +383,10 @@ This is the node you use inside your game code and it has these functions:
377383
* Maily used when your new loaded scene has a loading phase when added to scene tree
378384
* So to use this, first has to call `load_scene_interactive` to load your scene and then have to listen on `load_finished` signal and after the signal emits, you call this function and this function adds the loaded scene to the scene tree but exactly behind the current scene so that you still can not see the new scene
379385
24. `change_scene_to_existing_scene_in_scene_tree`(**fade_out_options**: Options, **fade_in_options**: Options, **general_options**: GeneralOptions) -> void:
380-
* when you added the loaded scene to the scene tree by `add_loaded_scene_to_scene_tree` function, you call this function after you are sure that the added scene to scene tree is completely ready and functional to change the active scene
386+
* When you added the loaded scene to the scene tree by `add_loaded_scene_to_scene_tree` function, you call this function after you are sure that the added scene to scene tree is completely ready and functional to change the active scene
387+
25. `pause`(**fade_out_options**: Options, **general_options**: GeneralOptions) -> void:
388+
* Just executes the fade out animation.
389+
* Use it with `resume` function when you need to do something but do not want the player to see it.
390+
26. `resume`(**fade_in_options**: Options, **general_options**: GeneralOptions) -> void:
391+
* Just executes the fade in animation.
392+
* Use it with `pause` function when you need to do something but do not want the player to see it.

addons/scene_manager/plugin.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
name="scene_manager"
44
description="A powerful scene transition manager for godot."
55
author="Maktoobgar"
6-
version="3.8.0"
6+
version="3.9.0"
77
script="plugin.gd"

0 commit comments

Comments
 (0)