Jelajahi Sumber

Remove unnecessary `randomize()` (#862)

Seed is now automatically randomized on startup in Godot 4.
Danil Alexeev 2 tahun lalu
induk
melakukan
1cf4fff74a

+ 0 - 2
2d/bullet_shower/bullets.gd

@@ -24,8 +24,6 @@ class Bullet:
 
 
 func _ready():
-	randomize()
-
 	shape = PhysicsServer2D.circle_shape_create()
 	# Set the collision shape's radius for each bullet in pixels.
 	PhysicsServer2D.shape_set_data(shape, 8)

+ 0 - 4
2d/dodge_the_creeps/Main.gd

@@ -3,10 +3,6 @@ extends Node
 @export var mob_scene: PackedScene
 var score
 
-func _ready():
-	randomize()
-
-
 func game_over():
 	$ScoreTimer.stop()
 	$MobTimer.stop()

+ 0 - 1
networking/webrtc_signaling/demo/client_ui.gd

@@ -65,7 +65,6 @@ func _on_peers_pressed():
 
 
 func _on_ping_pressed():
-	randomize()
 	ping.rpc(randf())
 
 

+ 0 - 1
viewport/dynamic_split_screen/wall_coloring.gd

@@ -5,7 +5,6 @@ extends Node3D
 # To use, attach this script to the "Walls" node.
 
 func _ready():
-	randomize()
 	var walls = get_tree().get_nodes_in_group("walls")
 	for wall in walls:
 		var material = StandardMaterial3D.new()