Added starter bullet hell rotation for horse boss.

This commit is contained in:
Henry 2026-03-04 12:17:43 +00:00
parent e608652170
commit bee8cf77f1
11 changed files with 106 additions and 39 deletions

View file

@ -10,18 +10,21 @@ var tween_speed: float = 1.4
var exploding = false
var rotate_speed: int = 100
var shooter_timer_wait_time: float = 0.2
var shoot_timer_wait_time: float = 0.2
var spawn_point_count: int = 4
var spawn_radius = 100
var horse_phase: bool = false
@onready var boss = $AnimationPlayer
@onready var shoot_timer = $ShootTimer
@onready var rotater = $Rotater
@onready var screensize = get_viewport_rect().size
func _ready():
spawn_bullet()
#func _ready():
#var step = 2 * PI / spawn_point_count
@ -36,23 +39,35 @@ func _ready():
#shoot_timer.start()
#func _process(delta: float) -> void:
#var new_rotation = rotater.rotation_degrees + rotate_speed * delta
#rotater.rotation_degrees - fmod(new_rotation, 360
#var new_rotation = rotater.ro tation_degrees + rotate_speed * delta
#rotater.rotation_degrees - fmod(new_rotation, 360)
func start():
shoot_timer.start()
print("Shoot timer started!")
func end():
shoot_timer.stop()
func _process(delta):
rotater.rotation_degrees += 2 # Adjust rotation speed
func spawn_bullet():
print("I'm spawning bullets!")
var bullet = bullet_scene.instantiate()
get_tree().root.add_child(bullet)
bullet.position = rotater.global_position
get_parent().add_child(bullet)
bullet.rotation = rotater.global_rotation
shoot_timer.wait_time = shoot_timer_wait_time
shoot_timer.start()
func _on_ShootTimer_timeout() -> void:
func _on_shoot_timer_timeout() -> void:
print("Shoot timer timeout!")
spawn_bullet()
#for s in rotater.get_children():
#var b = bullet_scene.instantiate()