1
0

Lesson 10

This commit is contained in:
FoxSpellCaster
2025-01-10 20:20:30 -05:00
parent 07cf5c6f53
commit 00a1e92556
10 changed files with 139 additions and 0 deletions

8
Physics/PhysicsPlayer.gd Normal file
View File

@@ -0,0 +1,8 @@
extends RigidBody2D
var hit_force : float = 50.0
func _process(delta):
if Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
var dir = global_position.direction_to(get_global_mouse_position())
apply_impulse(dir * hit_force)