Browse Source

:memo: Add scripts in slides

DricomDragon 2 năm trước cách đây
mục cha
commit
5b006c7f55

+ 107 - 0
godot/common/components/gdedit/GdScriptEdit.gd

@@ -0,0 +1,107 @@
+class_name GdScriptEdit
+extends CodeEdit
+
+
+const keywords: Array[String] = [
+		# Comparison
+	"<", # LESS,
+	"<=", # LESS_EQUAL,
+	">", # GREATER,
+	">=", # GREATER_EQUAL,
+	"==", # EQUAL_EQUAL,
+	"!=", # BANG_EQUAL,
+	# Logical
+	"and", # AND,
+	"or", # OR,
+	"not", # NOT,
+	"&&", # AMPERSAND_AMPERSAND,
+	"||", # PIPE_PIPE,
+	"!", # BANG,
+	# Bitwise
+	"&", # AMPERSAND,
+	"|", # PIPE,
+	"~", # TILDE,
+	"^", # CARET,
+	"<<", # LESS_LESS,
+	">>", # GREATER_GREATER,
+	# Math
+	"+", # PLUS,
+	"-", # MINUS,
+	"*", # STAR,
+	"**", # STAR_STAR,
+	"/", # SLASH,
+	"%", # PERCENT,
+	# Assignment
+	"=", # EQUAL,
+	"+=", # PLUS_EQUAL,
+	"-=", # MINUS_EQUAL,
+	"*=", # STAR_EQUAL,
+	"**=", # STAR_STAR_EQUAL,
+	"/=", # SLASH_EQUAL,
+	"%=", # PERCENT_EQUAL,
+	"<<=", # LESS_LESS_EQUAL,
+	">>=", # GREATER_GREATER_EQUAL,
+	"&=", # AMPERSAND_EQUAL,
+	"|=", # PIPE_EQUAL,
+	"^=", # CARET_EQUAL,
+	# Control flow
+	"if", # IF,
+	"elif", # ELIF,
+	"else", # ELSE,
+	"for", # FOR,
+	"while", # WHILE,
+	"break", # BREAK,
+	"continue", # CONTINUE,
+	"pass", # PASS,
+	"return", # RETURN,
+	"match", # MATCH,
+	# Keywords
+	"as", # AS,
+	"assert", # ASSERT,
+	"await", # AWAIT,
+	"breakpoint", # BREAKPOINT,
+	"class", # CLASS,
+	"class_name", # CLASS_NAME,
+	"const", # CONST,
+	"enum", # ENUM,
+	"extends", # EXTENDS,
+	"func", # FUNC,
+	"in", # IN,
+	"is", # IS,
+	"namespace", # NAMESPACE
+	"preload", # PRELOAD,
+	"self", # SELF,
+	"signal", # SIGNAL,
+	"static", # STATIC,
+	"super", # SUPER,
+	"trait", # TRAIT,
+	"var", # VAR,
+	"void", # VOID,
+	"yield", # YIELD,
+	# Punctuation
+	"[", # BRACKET_OPEN,
+	"]", # BRACKET_CLOSE,
+	"{", # BRACE_OPEN,
+	"}", # BRACE_CLOSE,
+	"(", # PARENTHESIS_OPEN,
+	")", # PARENTHESIS_CLOSE,
+	",", # COMMA,
+	";", # SEMICOLON,
+	".", # PERIOD,
+	"..", # PERIOD_PERIOD,
+	":", # COLON,
+	"$", # DOLLAR,
+	"->", # FORWARD_ARROW,
+]
+
+
+func _ready():
+	const keywords_color = Color(1.0, 0, 0)
+
+	var gd_syntax_highlight = SyntaxHighlighter.new()
+	var dict_keyword = {};
+	for keyword in keywords:
+		#dict_keyword.put(keyword, keywords_color)
+	#set_syntax_highlighter(gd_syntax_highlight)
+
+

+ 11 - 0
godot/common/components/gdedit/GdScriptEdit.tscn

@@ -0,0 +1,11 @@
+[gd_scene format=3 uid="uid://dogtm6fdbp3wl"]
+
+[node name="GdScriptEdit" type="CodeEdit"]
+offset_left = 109.0
+offset_top = 298.0
+offset_right = 1149.0
+offset_bottom = 955.0
+theme_override_font_sizes/font_size = 46
+text = "# waiting for code"
+virtual_keyboard_enabled = false
+gutters_draw_line_numbers = true

+ 6 - 6
godot/run/root.tscn

@@ -304,23 +304,23 @@ scale = Vector2(0.3, 0.3)
 position = Vector2(5331, 5895)
 
 [node name="ScriptVar" parent="Board/Show" instance=ExtResource("57_d8ku0")]
-position = Vector2(5704, 6785)
+position = Vector2(5704, 6757)
 scale = Vector2(0.3, 0.3)
 
 [node name="ScriptFunc" parent="Board/Show" instance=ExtResource("58_gq2jw")]
-position = Vector2(6357, 6793)
+position = Vector2(6421, 6772)
 scale = Vector2(0.3, 0.3)
 
 [node name="ScriptControl" parent="Board/Show" instance=ExtResource("59_edclw")]
-position = Vector2(5754, 7387)
+position = Vector2(5725, 7341)
 scale = Vector2(0.3, 0.3)
 
 [node name="ScriptOOP" parent="Board/Show" instance=ExtResource("60_ej2gs")]
-position = Vector2(6399, 7395)
+position = Vector2(6356, 7366)
 scale = Vector2(0.3, 0.3)
 
 [node name="ScriptGD" parent="Board/Show" instance=ExtResource("61_0xovb")]
-position = Vector2(6051, 7022)
+position = Vector2(6062, 7090)
 scale = Vector2(0.3, 0.3)
 
 [node name="Paradigme" parent="Board/Show" instance=ExtResource("37_j80fs")]
@@ -343,7 +343,7 @@ position = Vector2(10554, 5303)
 scale = Vector2(4, 4)
 
 [node name="News" parent="Board/Show" instance=ExtResource("67_8ieb0")]
-position = Vector2(10452, 6793)
+position = Vector2(10250, 6833)
 
 [node name="Learn" parent="Board/Show" instance=ExtResource("68_5sa57")]
 position = Vector2(10063, 8338)

+ 1 - 0
godot/slides/271/PackedStringArray.svg

@@ -0,0 +1 @@
+<svg height="12" viewBox="0 0 16 12" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m0 0v12h4v-2h-2v-8h2v-2zm12 0v2h2v8h-2v2h4v-12z" fill="#e0e0e0"/><path d="m7 2a3 3 0 0 0 -3 3v2a1 1 0 0 1 -1 1h-1v2h1a3 3 0 0 0 3-3v-2a1 1 0 0 1 1-1h1v3a3 3 0 0 0 3 3h2v-3a1 1 0 0 1 1-1v-2a3 3 0 0 0 -3 3v1a1 1 0 0 1 -1-1v-1h1v-2h-1v-2h-2z" fill="#4593ec"/><path d="m8 2v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1-1v-1h1v-2h-1v-2z" fill="#fff" fill-opacity=".39216"/></svg>

+ 37 - 0
godot/slides/271/PackedStringArray.svg.import

@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://by4l3q5rij0pt"
+path="res://.godot/imported/PackedStringArray.svg-1b281fc05de39b320ed1e84826570e9f.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://slides/271/PackedStringArray.svg"
+dest_files=["res://.godot/imported/PackedStringArray.svg-1b281fc05de39b320ed1e84826570e9f.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+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
+svg/scale=8.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false

+ 16 - 0
godot/slides/271/ScriptVar.tres

@@ -0,0 +1,16 @@
+[gd_resource type="CodeHighlighter" format=3 uid="uid://bacjkk7ikp2d5"]
+
+[resource]
+number_color = Color(1, 0, 0, 1)
+symbol_color = Color(0, 0, 1, 1)
+function_color = Color(0, 1, 0, 1)
+member_variable_color = Color(1, 0.545098, 0, 1)
+keyword_colors = {
+"for": Color(0.788235, 0, 0.580392, 1),
+"if": null,
+"var": null
+}
+member_keyword_colors = {
+"as": null,
+"hello": Color(0.898039, 0, 0.780392, 1)
+}

+ 47 - 8
godot/slides/271/ScriptVar.tscn

@@ -1,20 +1,59 @@
-[gd_scene load_steps=4 format=3 uid="uid://wttggjypivlal"]
+[gd_scene load_steps=9 format=3 uid="uid://dir3iaegou7hr"]
 
 [ext_resource type="Script" path="res://projector/slide/Slide.gd" id="1_srvlz"]
-[ext_resource type="Texture2D" uid="uid://zvtrlhjmnymn" path="res://icon.svg" id="2_jqvak"]
-[ext_resource type="PackedScene" uid="uid://qhkkeuljywavu" path="res://common/components/title/title.tscn" id="3_gddvr"]
+[ext_resource type="PackedScene" uid="uid://bvrtmyq4g1qes" path="res://common/components/title/title.tscn" id="3_gddvr"]
+[ext_resource type="Texture2D" uid="uid://dpbx5ghf6g5hr" path="res://slides/271/int.svg" id="4_i2xvr"]
+[ext_resource type="PackedScene" uid="uid://dogtm6fdbp3wl" path="res://common/components/gdedit/GdScriptEdit.tscn" id="4_uneks"]
+[ext_resource type="Texture2D" uid="uid://bpjnbtydn70jj" path="res://slides/271/float.svg" id="5_d7ofb"]
+[ext_resource type="Texture2D" uid="uid://bevxu72q6gx6o" path="res://slides/271/bool.svg" id="6_srauc"]
+[ext_resource type="Texture2D" uid="uid://dwlepb4saped1" path="res://slides/271/String.svg" id="7_6fbij"]
+[ext_resource type="Texture2D" uid="uid://by4l3q5rij0pt" path="res://slides/271/PackedStringArray.svg" id="8_ceq0u"]
 
 [node name="ScriptVar" type="Node2D"]
 script = ExtResource("1_srvlz")
 
-[node name="Sprite2D" type="Sprite2D" parent="."]
-position = Vector2(933, 546)
-scale = Vector2(2, 2)
-texture = ExtResource("2_jqvak")
-
 [node name="Title" parent="." instance=ExtResource("3_gddvr")]
 offset_left = 85.0
 offset_top = 26.0
 offset_right = 1847.0
 offset_bottom = 194.0
 text = "Les variables"
+
+[node name="GdScriptEdit" parent="." instance=ExtResource("4_uneks")]
+offset_left = 49.0
+offset_top = 406.0
+offset_right = 1837.0
+offset_bottom = 1063.0
+text = "var talk_name = \"Waiting GD\"
+talk_name = \"Make game with GD\"
+
+var penguin_speed: float = 50.0
+penguin_speed = penguin_speed + 5
+
+var penguin_names: Array(String) = [\"Tux\", \"Estragon\", \"Vladimir\"]
+var full_name = penguin_names[0] + \" Dupont\""
+
+[node name="Int" type="Sprite2D" parent="."]
+position = Vector2(187, 283)
+scale = Vector2(2, 2)
+texture = ExtResource("4_i2xvr")
+
+[node name="Float" type="Sprite2D" parent="."]
+position = Vector2(692, 292)
+scale = Vector2(2, 2)
+texture = ExtResource("5_d7ofb")
+
+[node name="Bool" type="Sprite2D" parent="."]
+position = Vector2(1184, 290)
+scale = Vector2(2, 2)
+texture = ExtResource("6_srauc")
+
+[node name="String" type="Sprite2D" parent="."]
+position = Vector2(1680, 286)
+scale = Vector2(2, 2)
+texture = ExtResource("7_6fbij")
+
+[node name="StringArray" type="Sprite2D" parent="."]
+position = Vector2(1678, 539)
+scale = Vector2(2, 2)
+texture = ExtResource("8_ceq0u")

+ 1 - 0
godot/slides/271/String.svg

@@ -0,0 +1 @@
+<svg height="12" viewBox="0 0 16 12" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m5 2a3 3 0 0 0 -3 3v2a1 1 0 0 1 -1 1h-1v2h1a3 3 0 0 0 3-3v-2a1 1 0 0 1 1-1h1v-2zm2 0v5a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1-1v-1h2v-2h-2v-2zm8 2a3 3 0 0 0 -3 3v3h2v-3a1 1 0 0 1 1-1h1v-2z" fill="#4593ec"/></svg>

+ 37 - 0
godot/slides/271/String.svg.import

@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://dwlepb4saped1"
+path="res://.godot/imported/String.svg-e10b0ca7dedcfdff708155e4f91fc235.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://slides/271/String.svg"
+dest_files=["res://.godot/imported/String.svg-e10b0ca7dedcfdff708155e4f91fc235.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+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
+svg/scale=8.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 0
godot/slides/271/bool.svg


+ 37 - 0
godot/slides/271/bool.svg.import

@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://bevxu72q6gx6o"
+path="res://.godot/imported/bool.svg-d985c6cb048be5d18781f748f207c3fd.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://slides/271/bool.svg"
+dest_files=["res://.godot/imported/bool.svg-d985c6cb048be5d18781f748f207c3fd.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+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
+svg/scale=8.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false

+ 1 - 0
godot/slides/271/float.svg

@@ -0,0 +1 @@
+<svg height="12" viewBox="0 0 16 12" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 2a3 3 0 0 0 -3 3v5h2v-2h2v-2h-2v-1a1 1 0 0 1 1-1h1v-2zm3 0v5a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1-1v-5zm6 0v5a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1-1v-1h2v-2h-2v-2z" fill="#35d4f4"/></svg>

+ 37 - 0
godot/slides/271/float.svg.import

@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://bpjnbtydn70jj"
+path="res://.godot/imported/float.svg-734a895c8c314eb0897b421272185ed4.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://slides/271/float.svg"
+dest_files=["res://.godot/imported/float.svg-734a895c8c314eb0897b421272185ed4.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+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
+svg/scale=8.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false

+ 1 - 0
godot/slides/271/int.svg

@@ -0,0 +1 @@
+<svg height="12" viewBox="0 0 16 12" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 2v2h2v-2zm11 0v5a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1-1v-1h2v-2h-2v-2zm-8 2v6h2v-4h1a1 1 0 0 1 1 1v3h2v-3a3 3 0 0 0 -3-3h-1zm-3 2v4h2v-4z" fill="#5abbef"/></svg>

+ 37 - 0
godot/slides/271/int.svg.import

@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://dpbx5ghf6g5hr"
+path="res://.godot/imported/int.svg-8c956969074f03146a425d24a3a57c4a.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://slides/271/int.svg"
+dest_files=["res://.godot/imported/int.svg-8c956969074f03146a425d24a3a57c4a.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+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
+svg/scale=8.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false

+ 18 - 4
godot/slides/272/ScriptFunc.tscn

@@ -1,14 +1,15 @@
-[gd_scene load_steps=4 format=3 uid="uid://zdmvzhmwyyitd"]
+[gd_scene load_steps=5 format=3 uid="uid://b56og44flraar"]
 
 [ext_resource type="Script" path="res://projector/slide/Slide.gd" id="1_orknp"]
-[ext_resource type="Texture2D" uid="uid://lyenkhohehew" path="res://icon.svg" id="2_ahfhc"]
-[ext_resource type="PackedScene" uid="uid://xvbeursksbbff" path="res://common/components/title/title.tscn" id="3_erhoj"]
+[ext_resource type="Texture2D" uid="uid://jjrdfilvox4o" path="res://icon.svg" id="2_ahfhc"]
+[ext_resource type="PackedScene" uid="uid://bvrtmyq4g1qes" path="res://common/components/title/title.tscn" id="3_erhoj"]
+[ext_resource type="PackedScene" uid="uid://dogtm6fdbp3wl" path="res://common/components/gdedit/GdScriptEdit.tscn" id="4_ai8iv"]
 
 [node name="ScriptFunc" type="Node2D"]
 script = ExtResource("1_orknp")
 
 [node name="Sprite2D" type="Sprite2D" parent="."]
-position = Vector2(933, 546)
+position = Vector2(1607, 612)
 scale = Vector2(2, 2)
 texture = ExtResource("2_ahfhc")
 
@@ -18,3 +19,16 @@ offset_top = 26.0
 offset_right = 1847.0
 offset_bottom = 194.0
 text = "Les fonctions"
+
+[node name="GdScriptEdit" parent="." instance=ExtResource("4_ai8iv")]
+offset_right = 1403.0
+offset_bottom = 1033.0
+text = "func _ready():
+	var penguin_speed: float = 40.0 # km/h
+	penguin_speed = accelerate(penguin_speed)
+	penguin_speed = accelerate(penguin_speed)
+
+func accelerate(initial_speed: float) -> float:
+	var new_speed: float = initial_speed + 2.0
+	return new_speed"
+delimiter_strings = Array[String](["\" \"", "' '"])

+ 21 - 4
godot/slides/273/ScriptControl.tscn

@@ -1,14 +1,15 @@
-[gd_scene load_steps=4 format=3 uid="uid://gicdwspdsrltn"]
+[gd_scene load_steps=5 format=3 uid="uid://cmwicqr38kp2v"]
 
 [ext_resource type="Script" path="res://projector/slide/Slide.gd" id="1_kycmz"]
-[ext_resource type="Texture2D" uid="uid://lhsmlyraebis" path="res://icon.svg" id="2_jaaua"]
-[ext_resource type="PackedScene" uid="uid://nlpegocxhlqei" path="res://common/components/title/title.tscn" id="3_lmauo"]
+[ext_resource type="Texture2D" uid="uid://jjrdfilvox4o" path="res://icon.svg" id="2_jaaua"]
+[ext_resource type="PackedScene" uid="uid://bvrtmyq4g1qes" path="res://common/components/title/title.tscn" id="3_lmauo"]
+[ext_resource type="PackedScene" uid="uid://dogtm6fdbp3wl" path="res://common/components/gdedit/GdScriptEdit.tscn" id="4_ia6x0"]
 
 [node name="ScriptControl" type="Node2D"]
 script = ExtResource("1_kycmz")
 
 [node name="Sprite2D" type="Sprite2D" parent="."]
-position = Vector2(933, 546)
+position = Vector2(1626, 652)
 scale = Vector2(2, 2)
 texture = ExtResource("2_jaaua")
 
@@ -18,3 +19,19 @@ offset_top = 26.0
 offset_right = 1847.0
 offset_bottom = 194.0
 text = "Les structures de contrôle"
+
+[node name="GdScriptEdit" parent="." instance=ExtResource("4_ia6x0")]
+offset_left = 58.0
+offset_top = 268.0
+offset_right = 1435.0
+offset_bottom = 1050.0
+text = "func _ready():
+	var penguin_speed: float = 40.0 # km/h
+	for increment in range(4):
+		penguin_speed = accelerate(penguin_speed)
+	if penguin_speed > 100:
+		print(\"Tux flies!\")
+
+func accelerate(initial_speed: float) -> float:
+	var new_speed: float = initial_speed + 2.0
+	return new_speed"

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 0
godot/slides/274/ResourcePreloader.svg


+ 37 - 0
godot/slides/274/ResourcePreloader.svg.import

@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://ow45ugvbarxo"
+path="res://.godot/imported/ResourcePreloader.svg-2cdf5dad662393991beb2f98427b7ed3.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://slides/274/ResourcePreloader.svg"
+dest_files=["res://.godot/imported/ResourcePreloader.svg-2cdf5dad662393991beb2f98427b7ed3.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+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
+svg/scale=8.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false

+ 32 - 9
godot/slides/274/ScriptOOP.tscn

@@ -1,20 +1,43 @@
-[gd_scene load_steps=4 format=3 uid="uid://ehobbrcgahrna"]
+[gd_scene load_steps=5 format=3 uid="uid://mafppe6pavvi"]
 
 [ext_resource type="Script" path="res://projector/slide/Slide.gd" id="1_wmeyv"]
-[ext_resource type="Texture2D" uid="uid://akyytflrafho" path="res://icon.svg" id="2_tjbrn"]
-[ext_resource type="PackedScene" uid="uid://ziowstynhnktd" path="res://common/components/title/title.tscn" id="3_corcb"]
+[ext_resource type="Texture2D" uid="uid://ow45ugvbarxo" path="res://slides/274/ResourcePreloader.svg" id="2_uose8"]
+[ext_resource type="PackedScene" uid="uid://bvrtmyq4g1qes" path="res://common/components/title/title.tscn" id="3_corcb"]
+[ext_resource type="PackedScene" uid="uid://dogtm6fdbp3wl" path="res://common/components/gdedit/GdScriptEdit.tscn" id="4_t16pa"]
 
 [node name="ScriptOOP" type="Node2D"]
 script = ExtResource("1_wmeyv")
 
 [node name="Sprite2D" type="Sprite2D" parent="."]
-position = Vector2(933, 546)
+modulate = Color(1, 0.411765, 1, 1)
+position = Vector2(456, 605)
 scale = Vector2(2, 2)
-texture = ExtResource("2_tjbrn")
+texture = ExtResource("2_uose8")
 
 [node name="Title" parent="." instance=ExtResource("3_corcb")]
-offset_left = 85.0
-offset_top = 26.0
-offset_right = 1847.0
-offset_bottom = 194.0
+offset_left = 5.0
+offset_top = 28.0
+offset_right = 961.0
+offset_bottom = 196.0
 text = "Orienté objet"
+
+[node name="GdScriptEdit" parent="." instance=ExtResource("4_t16pa")]
+offset_left = 1011.0
+offset_top = 18.0
+offset_right = 1895.0
+offset_bottom = 1064.0
+text = "class_name Penguin
+extends PhysicsBody2D
+# My amazing main character
+
+var speed: float = 0.0 # km/h
+
+func _ready():
+	speed = 10.0
+	for increment in range(4):
+		accelerate()
+	if penguin_speed > 100:
+		print(\"Tux flies!\")
+
+func accelerate() -> void:
+	speed = speed + 2.0"

+ 18 - 4
godot/slides/282/ParaCallback.tscn

@@ -1,14 +1,15 @@
-[gd_scene load_steps=4 format=3 uid="uid://oivpszlbhdvls"]
+[gd_scene load_steps=5 format=3 uid="uid://cwn31ttjrraci"]
 
 [ext_resource type="Script" path="res://projector/slide/Slide.gd" id="1_tzxtk"]
-[ext_resource type="Texture2D" uid="uid://znevzpscbchj" path="res://icon.svg" id="2_sronj"]
-[ext_resource type="PackedScene" uid="uid://whwiqnksqpkgf" path="res://common/components/title/title.tscn" id="3_aevos"]
+[ext_resource type="Texture2D" uid="uid://jjrdfilvox4o" path="res://icon.svg" id="2_sronj"]
+[ext_resource type="PackedScene" uid="uid://bvrtmyq4g1qes" path="res://common/components/title/title.tscn" id="3_aevos"]
+[ext_resource type="PackedScene" uid="uid://dogtm6fdbp3wl" path="res://common/components/gdedit/GdScriptEdit.tscn" id="4_h8f6o"]
 
 [node name="ParaCallback" type="Node2D"]
 script = ExtResource("1_tzxtk")
 
 [node name="Sprite2D" type="Sprite2D" parent="."]
-position = Vector2(933, 546)
+position = Vector2(1687, 610)
 scale = Vector2(2, 2)
 texture = ExtResource("2_sronj")
 
@@ -18,3 +19,16 @@ offset_top = 26.0
 offset_right = 1847.0
 offset_bottom = 194.0
 text = "Écoutez votre moteur"
+
+[node name="GdScriptEdit" parent="." instance=ExtResource("4_h8f6o")]
+offset_left = 47.0
+offset_right = 1087.0
+text = "
+func _ready() -> void:
+	pass
+
+func _physics_process() -> void:
+	pass
+
+func _unhandled_input() -> void:
+	pass"

+ 49 - 12
godot/slides/283/ParaSignal.tscn

@@ -1,20 +1,57 @@
-[gd_scene load_steps=4 format=3 uid="uid://pdppkwanokytt"]
+[gd_scene load_steps=6 format=3 uid="uid://drh3sqivyydkj"]
 
 [ext_resource type="Script" path="res://projector/slide/Slide.gd" id="1_pgpic"]
-[ext_resource type="Texture2D" uid="uid://nxihavnxdduz" path="res://icon.svg" id="2_uwmms"]
-[ext_resource type="PackedScene" uid="uid://ouuaumbbpiplb" path="res://common/components/title/title.tscn" id="3_agrvb"]
+[ext_resource type="PackedScene" uid="uid://dogtm6fdbp3wl" path="res://common/components/gdedit/GdScriptEdit.tscn" id="3_3pelu"]
+[ext_resource type="PackedScene" uid="uid://bvrtmyq4g1qes" path="res://common/components/title/title.tscn" id="3_agrvb"]
+[ext_resource type="Texture2D" uid="uid://dhwxa7mwj7lqq" path="res://slides/283/Signals.svg" id="4_okptd"]
+[ext_resource type="Texture2D" uid="uid://cs0ev7fsrh2wd" path="res://slides/283/Signal.svg" id="5_15k1w"]
 
 [node name="ParaSignal" type="Node2D"]
 script = ExtResource("1_pgpic")
 
-[node name="Sprite2D" type="Sprite2D" parent="."]
-position = Vector2(933, 546)
-scale = Vector2(2, 2)
-texture = ExtResource("2_uwmms")
-
 [node name="Title" parent="." instance=ExtResource("3_agrvb")]
-offset_left = 85.0
-offset_top = 26.0
-offset_right = 1847.0
-offset_bottom = 194.0
+offset_left = 815.0
+offset_top = 18.0
+offset_right = 1852.0
+offset_bottom = 186.0
 text = "Reliez vos nœuds"
+
+[node name="GdScriptSignalEmit" parent="." instance=ExtResource("3_3pelu")]
+offset_left = 28.0
+offset_top = 63.0
+offset_right = 768.0
+offset_bottom = 626.0
+text = "class_name Penguin
+
+signal jdll_reached
+
+func _process():
+	if is_at_jdll(position):
+		jdll_reached.emit()"
+
+[node name="SignalSend" type="Sprite2D" parent="."]
+modulate = Color(0, 1, 0, 1)
+position = Vector2(139, 769)
+scale = Vector2(2, 2)
+texture = ExtResource("4_okptd")
+
+[node name="GdScriptSignalReceive" parent="." instance=ExtResource("3_3pelu")]
+offset_left = 794.0
+offset_top = 377.0
+offset_right = 1912.0
+offset_bottom = 1076.0
+text = "class_name Talker
+
+const talk_room_pos = Vector3(14.0, 53.2, 10.9)
+
+func go_to_the_talk_room():
+	position = talk_room_pos
+
+func _on_Penguin_jdll_reached():
+	go_to_the_talk_room()"
+delimiter_strings = Array[String](["\" \"", "' '"])
+
+[node name="SignalRec" type="Sprite2D" parent="."]
+position = Vector2(652, 898)
+scale = Vector2(2, 2)
+texture = ExtResource("5_15k1w")

+ 1 - 0
godot/slides/283/Signal.svg

@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 3v10h2 4v-2h-4v-6h4v-2h-4zm9 1v3h-5v2h5v3l2.5-2 2.5-2-2.5-2z" fill="#ff5f5f"/></svg>

+ 37 - 0
godot/slides/283/Signal.svg.import

@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://cs0ev7fsrh2wd"
+path="res://.godot/imported/Signal.svg-b85759cc87c68a2e21785f336ef11383.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://slides/283/Signal.svg"
+dest_files=["res://.godot/imported/Signal.svg-b85759cc87c68a2e21785f336ef11383.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+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
+svg/scale=8.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false

+ 1 - 0
godot/slides/283/Signals.svg

@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m4 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1c4.4301 0 8 3.5699 8 8a1 1 0 0 0 1 1 1 1 0 0 0 1-1c0-5.511-4.489-10-10-10zm0 4a1 1 0 0 0 -1 1 1 1 0 0 0 1 1c2.221 0 4 1.779 4 4a1 1 0 0 0 1 1 1 1 0 0 0 1-1c0-3.3018-2.6981-6-6-6zm0 4a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2-2 2 2 0 0 0 -2-2z" fill="#e0e0e0"/></svg>

+ 37 - 0
godot/slides/283/Signals.svg.import

@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://dhwxa7mwj7lqq"
+path="res://.godot/imported/Signals.svg-56a45618713e9ab7547a0b9f6b0e77b1.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://slides/283/Signals.svg"
+dest_files=["res://.godot/imported/Signals.svg-56a45618713e9ab7547a0b9f6b0e77b1.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+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
+svg/scale=8.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false