Skip to content

Commit

Permalink
refactor: use compatibility backend for 2d project, ensure students g…
Browse files Browse the repository at this point in the history
…et no warnings on import
  • Loading branch information
NathanLovato committed Dec 13, 2023
1 parent c1bda32 commit 308cb57
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion 2d-project-completed/gun.gd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
extends Area2D


func _process(delta):
func _process(_delta):
var enemies_in_range = get_overlapping_bodies()
if enemies_in_range.size() > 0:
var target_enemy = enemies_in_range.front()
Expand Down
2 changes: 1 addition & 1 deletion 2d-project-completed/mob.gd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func _ready():
%Slime.play_walk()


func _physics_process(delta):
func _physics_process(_delta):
var direction = global_position.direction_to(player.global_position)
velocity = direction * speed
move_and_slide()
Expand Down
6 changes: 5 additions & 1 deletion 2d-project-completed/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Settings/Show_Tooltips=true

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

[display]
Expand Down Expand Up @@ -119,3 +119,7 @@ move_down={
[layer_names]

3d_physics/layer_2="player"

[rendering]

renderer/rendering_method="gl_compatibility"
6 changes: 5 additions & 1 deletion starter-files/2d-project/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Settings/Show_Tooltips=true
[application]

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

[display]
Expand Down Expand Up @@ -118,3 +118,7 @@ move_down={
[layer_names]

3d_physics/layer_2="player"

[rendering]

renderer/rendering_method="gl_compatibility"

0 comments on commit 308cb57

Please sign in to comment.