mirror of
https://github.com/creyD/ludum_dare_46.git
synced 2026-06-12 05:22:23 +02:00
Merge branch 'dev-music' of https://github.com/creyD/ludum_dare_46 into dev-music
This commit is contained in:
@@ -6,6 +6,9 @@ This is an example player controller script created by Paul
|
||||
var velocity := Vector2.ZERO
|
||||
var rollvector := Vector2(-1,0)
|
||||
|
||||
#one sound will be chosen at random
|
||||
export var SoundLibary :PoolStringArray=[]
|
||||
|
||||
# This is how you export variables with ranges to the editor window
|
||||
export(bool) var debug := false
|
||||
export(int, 0, 500) var ROLL_SPEED := 150
|
||||
@@ -172,9 +175,12 @@ func _on_Hurtbox_area_entered(area):
|
||||
|
||||
if area.damage > 0:
|
||||
damage_per_second += area.damage
|
||||
SoundControler.pub_play_effect("res://Player/Sounds/Hurt.wav",1)
|
||||
pass
|
||||
else:
|
||||
heal_per_second += abs(area.damage)
|
||||
var sound = SoundLibary[rand_range(0,SoundLibary.size())]
|
||||
SoundControler.pub_play_effect(sound,1)
|
||||
pass
|
||||
|
||||
func _on_Hurtbox_area_exited(area):
|
||||
@@ -187,6 +193,7 @@ func _on_Hurtbox_area_exited(area):
|
||||
|
||||
|
||||
func _on_Stats_no_health():
|
||||
SoundControler.pub_play_effect("res://Boss/SlimeBoss/Music/Evillaughwithoutslime.wav",1)
|
||||
queue_free()
|
||||
get_tree().get_root().get_node("World").hero_has_died()
|
||||
#get_tree().change_scene("res://Menus/TitleScreen/TitleScreen.tscn")
|
||||
|
||||
@@ -632,6 +632,7 @@ font_data = ExtResource( 6 )
|
||||
scale = Vector2( 2, 2 )
|
||||
collision_mask = 14
|
||||
script = ExtResource( 1 )
|
||||
SoundLibary = PoolStringArray( "res://Objects/Heart/Sounds/Heart2.wav", "res://Objects/Heart/Sounds/Heart3.wav", "res://Objects/Heart/Sounds/Heart4.wav", "res://Objects/Heart/Sounds/Heart5.wav", "res://Objects/Heart/Sounds/Heart.wav" )
|
||||
ROLL_SPEED = 120
|
||||
FRICTION = 270
|
||||
|
||||
|
||||
BIN
src/Player/Sounds/Hurt.wav
Normal file
BIN
src/Player/Sounds/Hurt.wav
Normal file
Binary file not shown.
21
src/Player/Sounds/Hurt.wav.import
Normal file
21
src/Player/Sounds/Hurt.wav.import
Normal file
@@ -0,0 +1,21 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/Hurt.wav-7259cfd30bcd9a0eb4363f17c23fd6bd.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Player/Sounds/Hurt.wav"
|
||||
dest_files=[ "res://.import/Hurt.wav-7259cfd30bcd9a0eb4363f17c23fd6bd.sample" ]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
compress/mode=0
|
||||
Reference in New Issue
Block a user