Add addons
This commit is contained in:
parent
2c862b2235
commit
3367bad24f
527 changed files with 36197 additions and 0 deletions
66
Sprout/addons/dialogic/Events/Wait/event_wait.gd
Normal file
66
Sprout/addons/dialogic/Events/Wait/event_wait.gd
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
@tool
|
||||
class_name DialogicWaitEvent
|
||||
extends DialogicEvent
|
||||
|
||||
## Event that waits for some time before continuing.
|
||||
|
||||
|
||||
### Settings
|
||||
|
||||
## The time in seconds that the event will stop before continuing.
|
||||
var time: float = 1.0
|
||||
## If true the text box will be hidden while the event waits.
|
||||
var hide_text: bool = true
|
||||
|
||||
|
||||
################################################################################
|
||||
## EXECUTE
|
||||
################################################################################
|
||||
|
||||
func _execute() -> void:
|
||||
if hide_text and dialogic.has_subsystem("Text"):
|
||||
dialogic.Text.hide_text_boxes()
|
||||
dialogic.current_state = dialogic.states.WAITING
|
||||
await dialogic.get_tree().create_timer(time, true, DialogicUtil.is_physics_timer()).timeout
|
||||
dialogic.current_state = dialogic.states.IDLE
|
||||
if hide_text and dialogic.has_subsystem("Text"):
|
||||
dialogic.Text.show_text_boxes()
|
||||
finish()
|
||||
|
||||
|
||||
################################################################################
|
||||
## INITIALIZE
|
||||
################################################################################
|
||||
|
||||
func _init() -> void:
|
||||
event_name = "Wait"
|
||||
set_default_color('Color6')
|
||||
event_category = Category.Timeline
|
||||
event_sorting_index = 5
|
||||
expand_by_default = false
|
||||
|
||||
|
||||
################################################################################
|
||||
## SAVING/LOADING
|
||||
################################################################################
|
||||
|
||||
func get_shortcode() -> String:
|
||||
return "wait"
|
||||
|
||||
|
||||
func get_shortcode_parameters() -> Dictionary:
|
||||
return {
|
||||
#param_name : property_info
|
||||
"time" : {"property": "time", "default": 1},
|
||||
"hide_text" : {"property": "hide_text", "default": true},
|
||||
}
|
||||
|
||||
|
||||
################################################################################
|
||||
## EDITOR REPRESENTATION
|
||||
################################################################################
|
||||
|
||||
func build_event_editor():
|
||||
add_header_edit('time', ValueType.Float)
|
||||
add_header_label('seconds.')
|
||||
add_body_edit('hide_text', ValueType.Bool, 'Hide text box:')
|
||||
BIN
Sprout/addons/dialogic/Events/Wait/icon.png
Normal file
BIN
Sprout/addons/dialogic/Events/Wait/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 546 B |
34
Sprout/addons/dialogic/Events/Wait/icon.png.import
Normal file
34
Sprout/addons/dialogic/Events/Wait/icon.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b0wtusjidl31g"
|
||||
path="res://.godot/imported/icon.png-b333af0ff802549083b776bcf6a7ee82.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/dialogic/Events/Wait/icon.png"
|
||||
dest_files=["res://.godot/imported/icon.png-b333af0ff802549083b776bcf6a7ee82.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
6
Sprout/addons/dialogic/Events/Wait/index.gd
Normal file
6
Sprout/addons/dialogic/Events/Wait/index.gd
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
@tool
|
||||
extends DialogicIndexer
|
||||
|
||||
|
||||
func _get_events() -> Array:
|
||||
return [this_folder.path_join('event_wait.gd')]
|
||||
Loading…
Add table
Add a link
Reference in a new issue