began work on STG-2600
This commit is contained in:
parent
c3b6ef3467
commit
0a4d9995d0
6 changed files with 351 additions and 0 deletions
16
maps/boss/2600.gd
Normal file
16
maps/boss/2600.gd
Normal file
|
@ -0,0 +1,16 @@
|
|||
extends Node2D
|
||||
|
||||
onready var Bullet = preload("res://objects/enemy/2600_bullet.tscn")
|
||||
onready var positions = $Positions
|
||||
export var shot_speed = 50
|
||||
export var fire_rate: float = 1
|
||||
onready var shoot_timer = $ShootTimer
|
||||
|
||||
func _on_ShootTimer_timeout():
|
||||
for pos in positions.get_children():
|
||||
var bullet = Bullet.instance()
|
||||
bullet.global_position = pos.global_position
|
||||
bullet.direction = Vector2.LEFT.rotated(pos.rotation)
|
||||
bullet.speed = shot_speed
|
||||
get_parent().add_child(bullet)
|
||||
shoot_timer.wait_time = fire_rate
|
Loading…
Add table
Add a link
Reference in a new issue