mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 15:00:09 +01:00
Remove unnecessary randomize() (#862)
Seed is now automatically randomized on startup in Godot 4.
This commit is contained in:
@@ -24,8 +24,6 @@ class Bullet:
|
|||||||
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
randomize()
|
|
||||||
|
|
||||||
shape = PhysicsServer2D.circle_shape_create()
|
shape = PhysicsServer2D.circle_shape_create()
|
||||||
# Set the collision shape's radius for each bullet in pixels.
|
# Set the collision shape's radius for each bullet in pixels.
|
||||||
PhysicsServer2D.shape_set_data(shape, 8)
|
PhysicsServer2D.shape_set_data(shape, 8)
|
||||||
|
|||||||
@@ -3,10 +3,6 @@ extends Node
|
|||||||
@export var mob_scene: PackedScene
|
@export var mob_scene: PackedScene
|
||||||
var score
|
var score
|
||||||
|
|
||||||
func _ready():
|
|
||||||
randomize()
|
|
||||||
|
|
||||||
|
|
||||||
func game_over():
|
func game_over():
|
||||||
$ScoreTimer.stop()
|
$ScoreTimer.stop()
|
||||||
$MobTimer.stop()
|
$MobTimer.stop()
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ func _on_peers_pressed():
|
|||||||
|
|
||||||
|
|
||||||
func _on_ping_pressed():
|
func _on_ping_pressed():
|
||||||
randomize()
|
|
||||||
ping.rpc(randf())
|
ping.rpc(randf())
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ extends Node3D
|
|||||||
# To use, attach this script to the "Walls" node.
|
# To use, attach this script to the "Walls" node.
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
randomize()
|
|
||||||
var walls = get_tree().get_nodes_in_group("walls")
|
var walls = get_tree().get_nodes_in_group("walls")
|
||||||
for wall in walls:
|
for wall in walls:
|
||||||
var material = StandardMaterial3D.new()
|
var material = StandardMaterial3D.new()
|
||||||
|
|||||||
Reference in New Issue
Block a user