Skip to content

Commit 308cb57

Browse files
committed
refactor: use compatibility backend for 2d project, ensure students get no warnings on import
1 parent c1bda32 commit 308cb57

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

2d-project-completed/gun.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
extends Area2D
22

33

4-
func _process(delta):
4+
func _process(_delta):
55
var enemies_in_range = get_overlapping_bodies()
66
if enemies_in_range.size() > 0:
77
var target_enemy = enemies_in_range.front()

2d-project-completed/mob.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func _ready():
1313
%Slime.play_walk()
1414

1515

16-
func _physics_process(delta):
16+
func _physics_process(_delta):
1717
var direction = global_position.direction_to(player.global_position)
1818
velocity = direction * speed
1919
move_and_slide()

2d-project-completed/project.godot

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Settings/Show_Tooltips=true
7676

7777
config/name="Your First 2D Game With Godot 4 (GDQuest)"
7878
run/main_scene="res://survivors_game.tscn"
79-
config/features=PackedStringArray("4.1", "Forward Plus")
79+
config/features=PackedStringArray("4.2", "Forward Plus")
8080
config/icon="res://icon.png"
8181

8282
[display]
@@ -119,3 +119,7 @@ move_down={
119119
[layer_names]
120120

121121
3d_physics/layer_2="player"
122+
123+
[rendering]
124+
125+
renderer/rendering_method="gl_compatibility"

starter-files/2d-project/project.godot

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Settings/Show_Tooltips=true
7575
[application]
7676

7777
config/name="Your First 2D Game With Godot 4: START (GDQuest)"
78-
config/features=PackedStringArray("4.1", "Forward Plus")
78+
config/features=PackedStringArray("4.2", "Forward Plus")
7979
config/icon="res://icon.png"
8080

8181
[display]
@@ -118,3 +118,7 @@ move_down={
118118
[layer_names]
119119

120120
3d_physics/layer_2="player"
121+
122+
[rendering]
123+
124+
renderer/rendering_method="gl_compatibility"

0 commit comments

Comments
 (0)