planet.gd 822 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. extends Spatial
  2. # Declare member variables here. Examples:
  3. # var a = 2
  4. # var b = "text"
  5. #These are terrible but will hopefully improve as problems become evident
  6. #Units are 1000km, hours, and degrees
  7. export var semimajor_axit = 10000
  8. export var eccentricity = 0
  9. export var angle_of_apoapsis = 42
  10. export var xtilt = 0
  11. export var ytilt = 0
  12. export var daylen = 6
  13. var orbital_period
  14. var planet
  15. var count
  16. # Called when the node enters the scene tree for the first time.
  17. func _ready():
  18. planet = get_child(0)
  19. self.rotate_y(angle_of_apoapsis)
  20. self.rotate_x(xtilt)
  21. self.rotate_z(ytilt)
  22. count = 0
  23. pass # Replace with function body.
  24. # Called every frame. 'delta' is the elapsed time since the previous frame.
  25. #func _process(delta):
  26. # pass
  27. # warning-ignore:unused_argument
  28. func _physics_process(delta):
  29. count += 1
  30. pass