fuzzyworld

godot-shooter / asteroids / files / items / Asteroid.gd

Branch asteroids · default branch · all branches

Asteroid.gd

Blame: the commit that last changed each line · file · history

7ce36b32 2023-12-21 Pavel Safronov1extends KinematicBody2D
56cadf84 2023-12-02 Pavel Safronov2class_name Asteroid
3
4export var spin_rate = .1
5export var velocity = Vector2.ZERO
6
7func _physics_process(delta: float) -> void:
7ce36b32 2023-12-21 Pavel Safronov8 rotation += spin_rate * delta
9 velocity = move_and_slide(velocity)