fuzzyworld

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

Branch asteroids · default branch · all branches

Asteroid.gd

220 B · history · blame

1extends KinematicBody2D
2class_name Asteroid
3
4export var spin_rate = .1
5export var velocity = Vector2.ZERO
6
7func _physics_process(delta: float) -> void:
8 rotation += spin_rate * delta
9 velocity = move_and_slide(velocity)