Tabs? Spaces?! WHO KNOWS!
This commit is contained in:
parent
ba3630f69b
commit
3d047f3a8b
2 changed files with 7 additions and 3 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,4 +1,6 @@
|
||||||
# Godot 4+ specific ignores
|
# Godot 4+ specific ignores
|
||||||
.godot/
|
.godot/
|
||||||
/android/
|
/android/
|
||||||
|
|
||||||
|
# Directories
|
||||||
.zed/
|
.zed/
|
||||||
|
|
|
||||||
6
ball.gd
6
ball.gd
|
|
@ -5,8 +5,10 @@ const SPEED : float = 300.0
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
initialize()
|
initialize()
|
||||||
|
|
||||||
func _physics_process(_delta: float) -> void:
|
func _physics_process(delta: float) -> void:
|
||||||
move_and_slide()
|
var collision = move_and_collide(velocity * _delta)
|
||||||
|
if collision:
|
||||||
|
velocity = velocity.bounce(collision.get_normal())
|
||||||
|
|
||||||
func initialize():
|
func initialize():
|
||||||
var extra_offset = 0.0 if randf() < 0.5 else PI
|
var extra_offset = 0.0 if randf() < 0.5 else PI
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue