123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- [gd_scene load_steps=6 format=3 uid="uid://mafppe6pavvi"]
- [ext_resource type="Script" path="res://addons/slide_show/projector/slide/Slide.gd" id="1_wmeyv"]
- [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="Texture2D" uid="uid://bo1tq5h0gwnik" path="res://slides/274/editor_gd4_inheritance_rigidbody.png" id="5_sq1r2"]
- [sub_resource type="CodeHighlighter" id="CodeHighlighter_2654d"]
- number_color = Color(0.803922, 0, 0.803922, 1)
- symbol_color = Color(0, 0, 1, 1)
- function_color = Color(0, 0.615686, 0, 1)
- member_variable_color = Color(0.8, 0.5, 0, 1)
- keyword_colors = {
- "InputEvent": Color(0, 0.4, 0, 1),
- "RigidBody2D": Color(0, 0.4, 0, 1),
- "String": Color(0, 0.4, 0, 1),
- "Vector2": Color(0, 0.4, 0, 1),
- "and": Color(1, 0, 0, 1),
- "bool": Color(1, 0, 0, 1),
- "class": Color(1, 0, 0, 1),
- "class_name": Color(1, 0, 0, 1),
- "extends": Color(1, 0, 0, 1),
- "float": Color(1, 0, 0, 1),
- "for": Color(1, 0, 0, 1),
- "func": Color(1, 0, 0, 1),
- "if": Color(1, 0, 0, 1),
- "in": Color(1, 0, 0, 1),
- "int": Color(1, 0, 0, 1),
- "return": Color(1, 0, 0, 1),
- "signal": Color(1, 0, 0, 1),
- "var": Color(1, 0, 0, 1)
- }
- [node name="ScriptOOP" type="Node2D"]
- script = ExtResource("1_wmeyv")
- [node name="PackageIcon" type="Sprite2D" parent="."]
- modulate = Color(1, 0.411765, 1, 1)
- position = Vector2(914, 121)
- texture = ExtResource("2_uose8")
- [node name="Title" parent="." instance=ExtResource("3_corcb")]
- offset_left = 5.0
- offset_top = 28.0
- offset_right = 860.0
- offset_bottom = 196.0
- text = "Orienté objet"
- [node name="GdScriptEdit" type="CodeEdit" parent="."]
- offset_left = 1011.0
- offset_top = 18.0
- offset_right = 1895.0
- offset_bottom = 1064.0
- theme_override_colors/background_color = Color(1, 1, 1, 1)
- theme_override_colors/font_color = Color(0, 0, 0, 1)
- theme_override_font_sizes/font_size = 46
- text = "class_name Penguin
- extends RigidBody2D
- # 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"
- deselect_on_focus_loss_enabled = false
- virtual_keyboard_enabled = false
- syntax_highlighter = SubResource("CodeHighlighter_2654d")
- gutters_draw_line_numbers = true
- indent_use_spaces = true
- [node name="Inheritance" type="Sprite2D" parent="."]
- position = Vector2(447.5, 641.8)
- scale = Vector2(3.225, 3.225)
- texture = ExtResource("5_sq1r2")
|