diff --git a/scripts/bullet.gd b/scripts/bullet.gd index c7845c5..a037d4b 100644 --- a/scripts/bullet.gd +++ b/scripts/bullet.gd @@ -12,8 +12,6 @@ func _physics_process(delta: float) -> void: # Movement position += direction.rotated(rotation) * speed * delta - print(rotation) - # Screenwrap if screen_wrap: var viewport_size := get_viewport_rect().size diff --git a/scripts/game.gd b/scripts/game.gd index 01609d6..bcebcf2 100644 --- a/scripts/game.gd +++ b/scripts/game.gd @@ -45,7 +45,7 @@ func _on_invader_spawner_shot() -> void: func increase_score(comet_size : int) -> void: # We add one since comet_size starts count at 0 comet_size += 1 - score += points_per_comet / comet_size + score += int(points_per_comet / comet_size) func update_ui()-> void: # Label strings must be all caps for font to render proper diff --git a/scripts/invader.gd b/scripts/invader.gd index 56b00a5..ccd32a7 100644 --- a/scripts/invader.gd +++ b/scripts/invader.gd @@ -23,7 +23,7 @@ func _ready() -> void: movement_direction.x = -1 else: movement_direction.x = 1 - random_position.y = randi_range(32, viewport_size.y + 32) + random_position.y = randf_range(32, viewport_size.y + 32) position = random_position diff --git a/scripts/invader_spawner.gd b/scripts/invader_spawner.gd index 907b129..1a5a7d1 100644 --- a/scripts/invader_spawner.gd +++ b/scripts/invader_spawner.gd @@ -6,7 +6,7 @@ const INVADER = preload("res://scenes/invader.tscn") var can_spawn = false -func _process(delta: float) -> void: +func _process(_delta: float) -> void: if can_spawn: spawn_invader() $SpawnTimer.wait_time = randi_range(20, 40)