Public repository for MUR pre alpha
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
783 B

  1. extends Node
  2. var random_number_generator:RandomNumberGenerator = RandomNumberGenerator.new()
  3. func _ready():
  4. random_number_generator.randomize()
  5. func randf():
  6. return random_number_generator.randf()
  7. func randf_range (from:float, to:float ):
  8. return random_number_generator.randf_range(from,to)
  9. func randfn (mean:float=0.0, deviation:float=1.0 ):
  10. return random_number_generator.randfn(mean, deviation)
  11. func randi():
  12. return random_number_generator.randi()
  13. func randi_range ( from:int, to:int ):
  14. return random_number_generator.randi_range( from, to)
  15. func clear_node(node:Node):
  16. for idx in range(node.get_child_count()):
  17. node.remove_child(node.get_child(0))
  18. func curve_get_last_point(curve:Curve3D):
  19. return curve.get_point_position(curve.get_point_count() - 1)