mirror of
https://gitee.com/freeyz/godot-mota.git
synced 2025-03-12 17:57:15 +08:00
增加音效
This commit is contained in:
parent
f82aee4b1a
commit
7167461059
@ -1,3 +1,3 @@
|
||||
source_md5="50010937a0008f8857e99b68ecf8cf26"
|
||||
dest_md5="cd9243ceb07604925dba2d627b2c4524"
|
||||
dest_md5="3691b6a615aaac170ce751aaf67badb7"
|
||||
|
||||
|
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
source_md5="a85f3b809a8dc6eced55feb12e6e3ddd"
|
||||
dest_md5="a94161e5f611fd4a9ddd5101aa20d4ba"
|
||||
dest_md5="ad05b30e5d400587666fbbec3b161d69"
|
||||
|
||||
|
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
source_md5="8920823388579e692abc54a105e82880"
|
||||
dest_md5="49d3ec2412cd56cd0e2618c618bc1ea8"
|
||||
dest_md5="a0930dbf9758117cebba212c9a6bab01"
|
||||
|
||||
|
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
source_md5="de765597b1083dd078ea4f6fca4fd7de"
|
||||
dest_md5="c10e903514f2bdaae62d215034e5a3fc"
|
||||
dest_md5="3675071a31137abe82b48e06ea6ebabc"
|
||||
|
||||
|
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
source_md5="c562987476d78f9c83def30e0e0a344d"
|
||||
dest_md5="c4d2b2916f2303b1ff80b9d8bd569eac"
|
||||
dest_md5="91d7db848e518fd99bf44c2db273cc88"
|
||||
|
||||
|
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
source_md5="a497865d78241d0f0a25678628183055"
|
||||
dest_md5="44bcbf3a6a12376f2ad1b19b19bf0373"
|
||||
dest_md5="e9576403864c2471342885463c3d29cc"
|
||||
|
||||
|
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
source_md5="98c326a36e3fb2a26474bbee06dac7c7"
|
||||
dest_md5="d5a73d0a562c6502a6c25bd88657f7e0"
|
||||
dest_md5="2a8aa00c6c9eae3cae37f9cd2765669a"
|
||||
|
||||
|
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
source_md5="b454d99e5322fb8b784140ca84fbe092"
|
||||
dest_md5="99fd2ce166c5d346bea9c71a903b7b6a"
|
||||
dest_md5="f09590535c7d9d6c63d617a2791e85d6"
|
||||
|
||||
|
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
source_md5="60514c3844e365d1aecfc555e1a44548"
|
||||
dest_md5="1adb04621553370458c19304359c525f"
|
||||
dest_md5="a169cfea77fabfc53aa7c8a7731b3fa6"
|
||||
|
||||
|
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
source_md5="8ce231e6f36adb8c4b104830265c50ce"
|
||||
dest_md5="b05eb83d9a1e2cb3cd78350b89a74073"
|
||||
dest_md5="5301ae1b1de46bade5fde958841aacfe"
|
||||
|
||||
|
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
source_md5="0d38c88de1975840c0cd77f66735e683"
|
||||
dest_md5="322c122c471553d86017465847bc8e38"
|
||||
dest_md5="841c64d97d216114deadbefd865d4e97"
|
||||
|
||||
|
Binary file not shown.
@ -20,7 +20,7 @@ compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
|
BIN
music/attack.mp3
BIN
music/attack.mp3
Binary file not shown.
BIN
music/bgm.mp3
BIN
music/bgm.mp3
Binary file not shown.
BIN
music/bomb.mp3
BIN
music/bomb.mp3
Binary file not shown.
Binary file not shown.
BIN
music/door.mp3
BIN
music/door.mp3
Binary file not shown.
BIN
music/equip.mp3
BIN
music/equip.mp3
Binary file not shown.
BIN
music/floor.mp3
BIN
music/floor.mp3
Binary file not shown.
BIN
music/item.mp3
BIN
music/item.mp3
Binary file not shown.
BIN
music/jump.mp3
BIN
music/jump.mp3
Binary file not shown.
Binary file not shown.
BIN
music/zone.mp3
BIN
music/zone.mp3
Binary file not shown.
@ -82,6 +82,7 @@ config/icon="res://settings/icon.png"
|
||||
|
||||
GameFloorManager="*res://scripts/GameFloorManager.gd"
|
||||
GameArchiveManager="*res://scripts/GameArchiveManager.gd"
|
||||
AffectAudioPlayer="*res://scripts/AffectAudioPlayer.gd"
|
||||
|
||||
[display]
|
||||
|
||||
@ -94,4 +95,8 @@ window/stretch/aspect="keep"
|
||||
|
||||
[rendering]
|
||||
|
||||
quality/driver/fallback_to_gles2=true
|
||||
quality/intended_usage/framebuffer_allocation=0
|
||||
quality/intended_usage/framebuffer_allocation.mobile=0
|
||||
quality/2d/use_pixel_snap=true
|
||||
environment/default_environment="res://settings/default_env.tres"
|
||||
|
29
scripts/AffectAudioPlayer.gd
Normal file
29
scripts/AffectAudioPlayer.gd
Normal file
@ -0,0 +1,29 @@
|
||||
extends AudioStreamPlayer2D
|
||||
|
||||
onready var attack = preload("res://sounds/attack.ogg")
|
||||
|
||||
onready var bomb = preload("res://sounds/bomb.ogg")
|
||||
|
||||
onready var center_fly = preload("res://sounds/centerFly.ogg")
|
||||
|
||||
onready var door = preload("res://sounds/door.ogg")
|
||||
|
||||
onready var equip = preload("res://sounds/equip.ogg")
|
||||
|
||||
onready var f = preload("res://sounds/floor.ogg")
|
||||
|
||||
onready var item = preload("res://sounds/item.ogg")
|
||||
|
||||
onready var jump = preload("res://sounds/jump.ogg")
|
||||
|
||||
onready var pickaxe = preload("res://sounds/pickaxe.ogg")
|
||||
|
||||
onready var zone = preload("res://sounds/zone.ogg")
|
||||
|
||||
func play_door():
|
||||
stream = door
|
||||
play()
|
||||
|
||||
func play_item():
|
||||
stream = item
|
||||
play()
|
@ -5,5 +5,5 @@ class_name BgmAudioPlayer
|
||||
func _ready():
|
||||
stream = load("res://sounds/bgm.ogg")
|
||||
playing = true
|
||||
volume_db -= 10
|
||||
volume_db -= 20
|
||||
pass
|
||||
|
@ -22,4 +22,5 @@ func on_player_touched():
|
||||
GameArchiveManager.player_info.red_key -= 1
|
||||
$"/root/Main/UI/KeyBackground/RedKeyCountLabel".text = GameArchiveManager.player_info.red_key as String
|
||||
door_sprite.queue_free()
|
||||
AffectAudioPlayer.play_door()
|
||||
GameArchiveManager.add_used_item(door_sprite.get_path())
|
||||
|
@ -30,4 +30,5 @@ func _on_Area2D_body_entered(body):
|
||||
GameArchiveManager.player_info.hp += elixirs_value
|
||||
$"/root/Main/UI/HpSprite/HpBackground/HpLabel".text = GameArchiveManager.player_info.hp as String
|
||||
GameArchiveManager.add_used_item(get_path())
|
||||
AffectAudioPlayer.play_item()
|
||||
queue_free()
|
||||
|
@ -43,3 +43,4 @@ func _on_Area2D_body_entered(body):
|
||||
$"/root/Main/UI/KeyBackground/GreenKeyCountLabel".text = GameArchiveManager.player_info.green_key as String
|
||||
queue_free()
|
||||
GameArchiveManager.add_used_item(get_path())
|
||||
AffectAudioPlayer.play_item()
|
||||
|
@ -11,5 +11,5 @@ dest_files=[ "res://.import/attack.ogg-f76ff4e84a599d537dd165b167a572d4.oggstr"
|
||||
|
||||
[params]
|
||||
|
||||
loop=true
|
||||
loop=false
|
||||
loop_offset=0
|
||||
|
@ -11,5 +11,5 @@ dest_files=[ "res://.import/bomb.ogg-5efebe2cad43415d948de40416af48a8.oggstr" ]
|
||||
|
||||
[params]
|
||||
|
||||
loop=true
|
||||
loop=false
|
||||
loop_offset=0
|
||||
|
@ -11,5 +11,5 @@ dest_files=[ "res://.import/centerFly.ogg-a5ae664f2f23559847fabf1b6ad35834.oggst
|
||||
|
||||
[params]
|
||||
|
||||
loop=true
|
||||
loop=false
|
||||
loop_offset=0
|
||||
|
@ -11,5 +11,5 @@ dest_files=[ "res://.import/door.ogg-cf3de28e49b4d64c2a8dab40e5ce65a9.oggstr" ]
|
||||
|
||||
[params]
|
||||
|
||||
loop=true
|
||||
loop=false
|
||||
loop_offset=0
|
||||
|
@ -11,5 +11,5 @@ dest_files=[ "res://.import/equip.ogg-d2884a375a4158917c3155b455e88238.oggstr" ]
|
||||
|
||||
[params]
|
||||
|
||||
loop=true
|
||||
loop=false
|
||||
loop_offset=0
|
||||
|
@ -11,5 +11,5 @@ dest_files=[ "res://.import/floor.ogg-179348b5537b3ab90093a87b3d5e7d35.oggstr" ]
|
||||
|
||||
[params]
|
||||
|
||||
loop=true
|
||||
loop=false
|
||||
loop_offset=0
|
||||
|
@ -11,5 +11,5 @@ dest_files=[ "res://.import/item.ogg-9d12925afedc51e40ec0abb1b0542aa0.oggstr" ]
|
||||
|
||||
[params]
|
||||
|
||||
loop=true
|
||||
loop=false
|
||||
loop_offset=0
|
||||
|
@ -11,5 +11,5 @@ dest_files=[ "res://.import/jump.ogg-de8df8640ff526968292c23fe5ec784f.oggstr" ]
|
||||
|
||||
[params]
|
||||
|
||||
loop=true
|
||||
loop=false
|
||||
loop_offset=0
|
||||
|
@ -11,5 +11,5 @@ dest_files=[ "res://.import/pickaxe.ogg-660fd619fe121f210ac6f9430a16ab5c.oggstr"
|
||||
|
||||
[params]
|
||||
|
||||
loop=true
|
||||
loop=false
|
||||
loop_offset=0
|
||||
|
@ -11,5 +11,5 @@ dest_files=[ "res://.import/zone.ogg-bc2bc36f8117bfa094934330d5ee9201.oggstr" ]
|
||||
|
||||
[params]
|
||||
|
||||
loop=true
|
||||
loop=false
|
||||
loop_offset=0
|
||||
|
Loading…
x
Reference in New Issue
Block a user