20 lines
456 B
GDScript
20 lines
456 B
GDScript
class_name Asteroid
|
|
extends CelestialBody
|
|
|
|
# The orbital radius for this asteroid.
|
|
var orbital_radius: float
|
|
|
|
func get_class_name() -> String:
|
|
return "Asteroid"
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
# An Asteroid has negligible mass for physics calculations.
|
|
mass = 0.001
|
|
radius = 5.0
|
|
|
|
# You can set a default texture here.
|
|
# texture = preload("res://assets/asteroid_texture.png")
|
|
|
|
super._ready()
|