forked from team-sg/hero-mark-2
All audio stuff moved to audio autoload and removed game.tscn in favor of just game.gd
This commit is contained in:
parent
30cfad6e7e
commit
e1a30188a6
21 changed files with 134 additions and 97 deletions
|
@ -29,7 +29,7 @@ func _on_ShootTimer_timeout():
|
|||
|
||||
func die():
|
||||
hp -= 1
|
||||
Game.play_sound(Game.a_boss_hurt,Game.ac_boss)
|
||||
Audio.play_sound(Audio.a_boss_hurt,Audio.ac_boss)
|
||||
match hp:
|
||||
2:
|
||||
emit_signal("entered_phase", 2)
|
||||
|
@ -41,7 +41,7 @@ func die():
|
|||
shoot_time = Vector2(0.3,0.5)
|
||||
0:
|
||||
Game.instance_node(Gore,position.x,position.y,map)
|
||||
Game.play_sound(Game.a_scrump_die,Game.ac_boss)
|
||||
Audio.play_sound(Audio.a_scrump_die,Audio.ac_boss)
|
||||
emit_signal("entered_phase",4)
|
||||
queue_free()
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ signal died()
|
|||
export var score_for_killing = 0
|
||||
export var blood = true
|
||||
|
||||
var death_sound = Game.a_die
|
||||
var death_sound = Audio.a_die
|
||||
var death_blood_offset = Vector2.ZERO
|
||||
|
||||
func _on_Hitbox_area_entered(area):
|
||||
|
@ -36,7 +36,7 @@ func die():
|
|||
death_particles.emitting = true
|
||||
get_parent().add_child(death_particles)
|
||||
|
||||
Game.play_sound(death_sound, Game.ac_die)
|
||||
Audio.play_sound(death_sound, Audio.ac_die)
|
||||
Game.score += score_for_killing
|
||||
emit_signal("died")
|
||||
queue_free()
|
||||
|
|
|
@ -12,7 +12,7 @@ export(int, "Left To Right", "Right To Left") var move_direction
|
|||
onready var startpos = position
|
||||
|
||||
func _ready():
|
||||
death_sound = Game.a_die_robot
|
||||
death_sound = Audio.a_die_robot
|
||||
up_boundary *= 8
|
||||
down_boundary *= 8
|
||||
#Move in direction selected
|
||||
|
|
|
@ -2,7 +2,7 @@ extends "res://objects/enemy/enemy.gd"
|
|||
|
||||
func _ready():
|
||||
$AnimatedSprite.play("explode")
|
||||
Game.play_sound(Game.a_die_robot,Game.ac_die)
|
||||
Audio.play_sound(Audio.a_die_robot,Audio.ac_die)
|
||||
|
||||
func _on_animation_finished():
|
||||
queue_free()
|
||||
|
|
|
@ -17,7 +17,7 @@ onready var arrow_spawn_l = $ArrowSpawnL
|
|||
onready var arrow_spawn_r = $ArrowSpawnR
|
||||
|
||||
func _ready():
|
||||
death_sound = Game.a_die_skeleton
|
||||
death_sound = Audio.a_die_skeleton
|
||||
timer.start(shoot_time)
|
||||
|
||||
func _on_Timer_timeout():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue