forked from team-sg/hero-mark-2
sg 2083
This commit is contained in:
parent
dfc203fa41
commit
436c604849
5 changed files with 1533 additions and 0 deletions
25
objects/enemy/boss/sg2083.gd
Normal file
25
objects/enemy/boss/sg2083.gd
Normal file
|
@ -0,0 +1,25 @@
|
|||
extends Node2D
|
||||
|
||||
const Bullet = preload("res://objects/enemy/2600_bullet.tscn")
|
||||
|
||||
export var shot_speed: float = 50
|
||||
export var fire_rate: float = 1
|
||||
|
||||
onready var bullet_positions = $"%BulletPositions"
|
||||
onready var shoot_timer = $ShootTimer
|
||||
onready var anims = $AnimationPlayer
|
||||
onready var head_sprite = $"%Head"
|
||||
|
||||
func _input(event):
|
||||
if Input.is_action_pressed("shoot"):
|
||||
shoot()
|
||||
|
||||
func shoot():
|
||||
Audio.play_sound(Audio.a_bullet_barrage,Audio.ac_boss)
|
||||
for pos in bullet_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
|
1397
objects/enemy/boss/sg2083.tscn
Normal file
1397
objects/enemy/boss/sg2083.tscn
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue