diff --git a/.import/attack.ogg-f76ff4e84a599d537dd165b167a572d4.md5 b/.import/attack.ogg-f76ff4e84a599d537dd165b167a572d4.md5 new file mode 100644 index 0000000..104e086 --- /dev/null +++ b/.import/attack.ogg-f76ff4e84a599d537dd165b167a572d4.md5 @@ -0,0 +1,3 @@ +source_md5="50010937a0008f8857e99b68ecf8cf26" +dest_md5="cd9243ceb07604925dba2d627b2c4524" + diff --git a/.import/attack.ogg-f76ff4e84a599d537dd165b167a572d4.oggstr b/.import/attack.ogg-f76ff4e84a599d537dd165b167a572d4.oggstr new file mode 100644 index 0000000..64b8916 Binary files /dev/null and b/.import/attack.ogg-f76ff4e84a599d537dd165b167a572d4.oggstr differ diff --git a/.import/bgm.ogg-c456805944f69ed9f625bdcdec0091ed.md5 b/.import/bgm.ogg-c456805944f69ed9f625bdcdec0091ed.md5 new file mode 100644 index 0000000..9f4e355 --- /dev/null +++ b/.import/bgm.ogg-c456805944f69ed9f625bdcdec0091ed.md5 @@ -0,0 +1,3 @@ +source_md5="cbf39cdbbe72293acb3da416b6e75b8b" +dest_md5="802fdeab4f08a2f727a4cc4d8060622b" + diff --git a/.import/bgm.ogg-c456805944f69ed9f625bdcdec0091ed.oggstr b/.import/bgm.ogg-c456805944f69ed9f625bdcdec0091ed.oggstr new file mode 100644 index 0000000..b7c78da Binary files /dev/null and b/.import/bgm.ogg-c456805944f69ed9f625bdcdec0091ed.oggstr differ diff --git a/.import/bomb.ogg-5efebe2cad43415d948de40416af48a8.md5 b/.import/bomb.ogg-5efebe2cad43415d948de40416af48a8.md5 new file mode 100644 index 0000000..f3292ee --- /dev/null +++ b/.import/bomb.ogg-5efebe2cad43415d948de40416af48a8.md5 @@ -0,0 +1,3 @@ +source_md5="a85f3b809a8dc6eced55feb12e6e3ddd" +dest_md5="a94161e5f611fd4a9ddd5101aa20d4ba" + diff --git a/.import/bomb.ogg-5efebe2cad43415d948de40416af48a8.oggstr b/.import/bomb.ogg-5efebe2cad43415d948de40416af48a8.oggstr new file mode 100644 index 0000000..49cbcdd Binary files /dev/null and b/.import/bomb.ogg-5efebe2cad43415d948de40416af48a8.oggstr differ diff --git a/.import/centerFly.ogg-a5ae664f2f23559847fabf1b6ad35834.md5 b/.import/centerFly.ogg-a5ae664f2f23559847fabf1b6ad35834.md5 new file mode 100644 index 0000000..484f16a --- /dev/null +++ b/.import/centerFly.ogg-a5ae664f2f23559847fabf1b6ad35834.md5 @@ -0,0 +1,3 @@ +source_md5="8920823388579e692abc54a105e82880" +dest_md5="49d3ec2412cd56cd0e2618c618bc1ea8" + diff --git a/.import/centerFly.ogg-a5ae664f2f23559847fabf1b6ad35834.oggstr b/.import/centerFly.ogg-a5ae664f2f23559847fabf1b6ad35834.oggstr new file mode 100644 index 0000000..de36c07 Binary files /dev/null and b/.import/centerFly.ogg-a5ae664f2f23559847fabf1b6ad35834.oggstr differ diff --git a/.import/door.ogg-cf3de28e49b4d64c2a8dab40e5ce65a9.md5 b/.import/door.ogg-cf3de28e49b4d64c2a8dab40e5ce65a9.md5 new file mode 100644 index 0000000..c18f69a --- /dev/null +++ b/.import/door.ogg-cf3de28e49b4d64c2a8dab40e5ce65a9.md5 @@ -0,0 +1,3 @@ +source_md5="de765597b1083dd078ea4f6fca4fd7de" +dest_md5="c10e903514f2bdaae62d215034e5a3fc" + diff --git a/.import/door.ogg-cf3de28e49b4d64c2a8dab40e5ce65a9.oggstr b/.import/door.ogg-cf3de28e49b4d64c2a8dab40e5ce65a9.oggstr new file mode 100644 index 0000000..abe13cc Binary files /dev/null and b/.import/door.ogg-cf3de28e49b4d64c2a8dab40e5ce65a9.oggstr differ diff --git a/.import/equip.ogg-d2884a375a4158917c3155b455e88238.md5 b/.import/equip.ogg-d2884a375a4158917c3155b455e88238.md5 new file mode 100644 index 0000000..da5867c --- /dev/null +++ b/.import/equip.ogg-d2884a375a4158917c3155b455e88238.md5 @@ -0,0 +1,3 @@ +source_md5="c562987476d78f9c83def30e0e0a344d" +dest_md5="c4d2b2916f2303b1ff80b9d8bd569eac" + diff --git a/.import/equip.ogg-d2884a375a4158917c3155b455e88238.oggstr b/.import/equip.ogg-d2884a375a4158917c3155b455e88238.oggstr new file mode 100644 index 0000000..36b5da2 Binary files /dev/null and b/.import/equip.ogg-d2884a375a4158917c3155b455e88238.oggstr differ diff --git a/.import/floor.ogg-179348b5537b3ab90093a87b3d5e7d35.md5 b/.import/floor.ogg-179348b5537b3ab90093a87b3d5e7d35.md5 new file mode 100644 index 0000000..658b531 --- /dev/null +++ b/.import/floor.ogg-179348b5537b3ab90093a87b3d5e7d35.md5 @@ -0,0 +1,3 @@ +source_md5="a497865d78241d0f0a25678628183055" +dest_md5="44bcbf3a6a12376f2ad1b19b19bf0373" + diff --git a/.import/floor.ogg-179348b5537b3ab90093a87b3d5e7d35.oggstr b/.import/floor.ogg-179348b5537b3ab90093a87b3d5e7d35.oggstr new file mode 100644 index 0000000..08605af Binary files /dev/null and b/.import/floor.ogg-179348b5537b3ab90093a87b3d5e7d35.oggstr differ diff --git a/.import/item.ogg-9d12925afedc51e40ec0abb1b0542aa0.md5 b/.import/item.ogg-9d12925afedc51e40ec0abb1b0542aa0.md5 new file mode 100644 index 0000000..0037788 --- /dev/null +++ b/.import/item.ogg-9d12925afedc51e40ec0abb1b0542aa0.md5 @@ -0,0 +1,3 @@ +source_md5="98c326a36e3fb2a26474bbee06dac7c7" +dest_md5="d5a73d0a562c6502a6c25bd88657f7e0" + diff --git a/.import/item.ogg-9d12925afedc51e40ec0abb1b0542aa0.oggstr b/.import/item.ogg-9d12925afedc51e40ec0abb1b0542aa0.oggstr new file mode 100644 index 0000000..a300796 Binary files /dev/null and b/.import/item.ogg-9d12925afedc51e40ec0abb1b0542aa0.oggstr differ diff --git a/.import/jump.ogg-de8df8640ff526968292c23fe5ec784f.md5 b/.import/jump.ogg-de8df8640ff526968292c23fe5ec784f.md5 new file mode 100644 index 0000000..9dadcfb --- /dev/null +++ b/.import/jump.ogg-de8df8640ff526968292c23fe5ec784f.md5 @@ -0,0 +1,3 @@ +source_md5="b454d99e5322fb8b784140ca84fbe092" +dest_md5="99fd2ce166c5d346bea9c71a903b7b6a" + diff --git a/.import/jump.ogg-de8df8640ff526968292c23fe5ec784f.oggstr b/.import/jump.ogg-de8df8640ff526968292c23fe5ec784f.oggstr new file mode 100644 index 0000000..3a22d5d Binary files /dev/null and b/.import/jump.ogg-de8df8640ff526968292c23fe5ec784f.oggstr differ diff --git a/.import/pickaxe.ogg-660fd619fe121f210ac6f9430a16ab5c.md5 b/.import/pickaxe.ogg-660fd619fe121f210ac6f9430a16ab5c.md5 new file mode 100644 index 0000000..ce1f2c9 --- /dev/null +++ b/.import/pickaxe.ogg-660fd619fe121f210ac6f9430a16ab5c.md5 @@ -0,0 +1,3 @@ +source_md5="8ce231e6f36adb8c4b104830265c50ce" +dest_md5="b05eb83d9a1e2cb3cd78350b89a74073" + diff --git a/.import/pickaxe.ogg-660fd619fe121f210ac6f9430a16ab5c.oggstr b/.import/pickaxe.ogg-660fd619fe121f210ac6f9430a16ab5c.oggstr new file mode 100644 index 0000000..d240e1e Binary files /dev/null and b/.import/pickaxe.ogg-660fd619fe121f210ac6f9430a16ab5c.oggstr differ diff --git a/.import/zone.ogg-bc2bc36f8117bfa094934330d5ee9201.md5 b/.import/zone.ogg-bc2bc36f8117bfa094934330d5ee9201.md5 new file mode 100644 index 0000000..7ed86bd --- /dev/null +++ b/.import/zone.ogg-bc2bc36f8117bfa094934330d5ee9201.md5 @@ -0,0 +1,3 @@ +source_md5="0d38c88de1975840c0cd77f66735e683" +dest_md5="322c122c471553d86017465847bc8e38" + diff --git a/.import/zone.ogg-bc2bc36f8117bfa094934330d5ee9201.oggstr b/.import/zone.ogg-bc2bc36f8117bfa094934330d5ee9201.oggstr new file mode 100644 index 0000000..007237d Binary files /dev/null and b/.import/zone.ogg-bc2bc36f8117bfa094934330d5ee9201.oggstr differ diff --git a/MainScene.tscn b/MainScene.tscn index b861beb..2740f02 100644 --- a/MainScene.tscn +++ b/MainScene.tscn @@ -1,11 +1,15 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=5 format=2] [ext_resource path="res://scenes/UI.tscn" type="PackedScene" id=1] [ext_resource path="res://scenes/floors/Floor1.tscn" type="PackedScene" id=2] +[ext_resource path="res://scripts/BgmAudioPlayer.gd" type="Script" id=3] [ext_resource path="res://images/mota_tileset.tres" type="TileSet" id=4] [node name="Main" type="Node2D"] +[node name="BgmAudioPlayer" type="AudioStreamPlayer2D" parent="."] +script = ExtResource( 3 ) + [node name="BackgroundTileMap" type="TileMap" parent="."] tile_set = ExtResource( 4 ) cell_size = Vector2( 32, 32 ) diff --git a/music/attack.mp3 b/music/attack.mp3 new file mode 100644 index 0000000..259b759 Binary files /dev/null and b/music/attack.mp3 differ diff --git a/music/bgm.mp3 b/music/bgm.mp3 new file mode 100644 index 0000000..199d0bb Binary files /dev/null and b/music/bgm.mp3 differ diff --git a/music/bomb.mp3 b/music/bomb.mp3 new file mode 100644 index 0000000..bf65b83 Binary files /dev/null and b/music/bomb.mp3 differ diff --git a/music/centerFly.mp3 b/music/centerFly.mp3 new file mode 100644 index 0000000..8246763 Binary files /dev/null and b/music/centerFly.mp3 differ diff --git a/music/door.mp3 b/music/door.mp3 new file mode 100644 index 0000000..ea6706d Binary files /dev/null and b/music/door.mp3 differ diff --git a/music/equip.mp3 b/music/equip.mp3 new file mode 100644 index 0000000..5d82178 Binary files /dev/null and b/music/equip.mp3 differ diff --git a/music/floor.mp3 b/music/floor.mp3 new file mode 100644 index 0000000..96dc4fa Binary files /dev/null and b/music/floor.mp3 differ diff --git a/music/item.mp3 b/music/item.mp3 new file mode 100644 index 0000000..5d82178 Binary files /dev/null and b/music/item.mp3 differ diff --git a/music/jump.mp3 b/music/jump.mp3 new file mode 100644 index 0000000..b8ce8f7 Binary files /dev/null and b/music/jump.mp3 differ diff --git a/music/pickaxe.mp3 b/music/pickaxe.mp3 new file mode 100644 index 0000000..be59c53 Binary files /dev/null and b/music/pickaxe.mp3 differ diff --git a/music/zone.mp3 b/music/zone.mp3 new file mode 100644 index 0000000..eccf53c Binary files /dev/null and b/music/zone.mp3 differ diff --git a/project.godot b/project.godot index a1af023..a9d90f2 100644 --- a/project.godot +++ b/project.godot @@ -14,6 +14,11 @@ _global_script_classes=[ { "language": "GDScript", "path": "res://scripts/ArrayTween.gd" }, { +"base": "AudioStreamPlayer2D", +"class": "BgmAudioPlayer", +"language": "GDScript", +"path": "res://scripts/BgmAudioPlayer.gd" +}, { "base": "Sprite", "class": "DoorSprite", "language": "GDScript", @@ -56,6 +61,7 @@ _global_script_classes=[ { } ] _global_script_class_icons={ "ArrayTween": "", +"BgmAudioPlayer": "", "DoorSprite": "", "DoorStaticBody2D": "", "ElixirsSprite": "", diff --git a/scripts/BgmAudioPlayer.gd b/scripts/BgmAudioPlayer.gd new file mode 100644 index 0000000..a9ea782 --- /dev/null +++ b/scripts/BgmAudioPlayer.gd @@ -0,0 +1,9 @@ +extends AudioStreamPlayer2D + +class_name BgmAudioPlayer + +func _ready(): + stream = load("res://sounds/bgm.ogg") + playing = true + volume_db -= 10 + pass diff --git a/scripts/GameFloorManager.gd b/scripts/GameFloorManager.gd index 6d133cc..3ba44e4 100644 --- a/scripts/GameFloorManager.gd +++ b/scripts/GameFloorManager.gd @@ -10,7 +10,6 @@ func load_by_floor(f:int) -> void: root.get_node("Floor%s" % f).free() root.add_child(next_floor) for used_item in used_items: - print("path ",used_item) var node = next_floor.get_node(used_item) if node != null: node.free() diff --git a/scripts/NavigationTileMap.gd b/scripts/NavigationTileMap.gd index b83dec4..fab2e3c 100644 --- a/scripts/NavigationTileMap.gd +++ b/scripts/NavigationTileMap.gd @@ -18,7 +18,6 @@ func _ready(): var cells := get_cells() init_nodes(cells) init_edges(cells) - print("rect ", get_used_rect()) # 初始化nodes func init_nodes(cells:Array): @@ -54,12 +53,9 @@ func get_cells() -> Array: var cells = get_used_cells() if not collsion_tilemap_path.is_empty(): var collsion_tilemap = get_node(collsion_tilemap_path) as TileMap - print("collsion_tilemap ", collsion_tilemap) var collsion_cells = collsion_tilemap.get_used_cells() for collsion_cell in collsion_cells: var index = cells.find(collsion_cell) if index != -1: - print("index ",index) - print("cell ",cells[index]) cells.remove(index) return cells diff --git a/sounds/attack.ogg b/sounds/attack.ogg new file mode 100644 index 0000000..ab0caca Binary files /dev/null and b/sounds/attack.ogg differ diff --git a/sounds/attack.ogg.import b/sounds/attack.ogg.import new file mode 100644 index 0000000..34fa08f --- /dev/null +++ b/sounds/attack.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/attack.ogg-f76ff4e84a599d537dd165b167a572d4.oggstr" + +[deps] + +source_file="res://sounds/attack.ogg" +dest_files=[ "res://.import/attack.ogg-f76ff4e84a599d537dd165b167a572d4.oggstr" ] + +[params] + +loop=true +loop_offset=0 diff --git a/sounds/bgm.ogg b/sounds/bgm.ogg new file mode 100644 index 0000000..48aa475 Binary files /dev/null and b/sounds/bgm.ogg differ diff --git a/sounds/bgm.ogg.import b/sounds/bgm.ogg.import new file mode 100644 index 0000000..5fc0222 --- /dev/null +++ b/sounds/bgm.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/bgm.ogg-c456805944f69ed9f625bdcdec0091ed.oggstr" + +[deps] + +source_file="res://sounds/bgm.ogg" +dest_files=[ "res://.import/bgm.ogg-c456805944f69ed9f625bdcdec0091ed.oggstr" ] + +[params] + +loop=true +loop_offset=0 diff --git a/sounds/bomb.ogg b/sounds/bomb.ogg new file mode 100644 index 0000000..345fe72 Binary files /dev/null and b/sounds/bomb.ogg differ diff --git a/sounds/bomb.ogg.import b/sounds/bomb.ogg.import new file mode 100644 index 0000000..23c2127 --- /dev/null +++ b/sounds/bomb.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/bomb.ogg-5efebe2cad43415d948de40416af48a8.oggstr" + +[deps] + +source_file="res://sounds/bomb.ogg" +dest_files=[ "res://.import/bomb.ogg-5efebe2cad43415d948de40416af48a8.oggstr" ] + +[params] + +loop=true +loop_offset=0 diff --git a/sounds/centerFly.ogg b/sounds/centerFly.ogg new file mode 100644 index 0000000..607a22f Binary files /dev/null and b/sounds/centerFly.ogg differ diff --git a/sounds/centerFly.ogg.import b/sounds/centerFly.ogg.import new file mode 100644 index 0000000..d34c498 --- /dev/null +++ b/sounds/centerFly.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/centerFly.ogg-a5ae664f2f23559847fabf1b6ad35834.oggstr" + +[deps] + +source_file="res://sounds/centerFly.ogg" +dest_files=[ "res://.import/centerFly.ogg-a5ae664f2f23559847fabf1b6ad35834.oggstr" ] + +[params] + +loop=true +loop_offset=0 diff --git a/sounds/door.ogg b/sounds/door.ogg new file mode 100644 index 0000000..023f2c5 Binary files /dev/null and b/sounds/door.ogg differ diff --git a/sounds/door.ogg.import b/sounds/door.ogg.import new file mode 100644 index 0000000..083dc17 --- /dev/null +++ b/sounds/door.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/door.ogg-cf3de28e49b4d64c2a8dab40e5ce65a9.oggstr" + +[deps] + +source_file="res://sounds/door.ogg" +dest_files=[ "res://.import/door.ogg-cf3de28e49b4d64c2a8dab40e5ce65a9.oggstr" ] + +[params] + +loop=true +loop_offset=0 diff --git a/sounds/equip.ogg b/sounds/equip.ogg new file mode 100644 index 0000000..757c241 Binary files /dev/null and b/sounds/equip.ogg differ diff --git a/sounds/equip.ogg.import b/sounds/equip.ogg.import new file mode 100644 index 0000000..33a0273 --- /dev/null +++ b/sounds/equip.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/equip.ogg-d2884a375a4158917c3155b455e88238.oggstr" + +[deps] + +source_file="res://sounds/equip.ogg" +dest_files=[ "res://.import/equip.ogg-d2884a375a4158917c3155b455e88238.oggstr" ] + +[params] + +loop=true +loop_offset=0 diff --git a/sounds/floor.ogg b/sounds/floor.ogg new file mode 100644 index 0000000..60475d6 Binary files /dev/null and b/sounds/floor.ogg differ diff --git a/sounds/floor.ogg.import b/sounds/floor.ogg.import new file mode 100644 index 0000000..30e3285 --- /dev/null +++ b/sounds/floor.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/floor.ogg-179348b5537b3ab90093a87b3d5e7d35.oggstr" + +[deps] + +source_file="res://sounds/floor.ogg" +dest_files=[ "res://.import/floor.ogg-179348b5537b3ab90093a87b3d5e7d35.oggstr" ] + +[params] + +loop=true +loop_offset=0 diff --git a/sounds/item.ogg b/sounds/item.ogg new file mode 100644 index 0000000..b24ec10 Binary files /dev/null and b/sounds/item.ogg differ diff --git a/sounds/item.ogg.import b/sounds/item.ogg.import new file mode 100644 index 0000000..c120356 --- /dev/null +++ b/sounds/item.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/item.ogg-9d12925afedc51e40ec0abb1b0542aa0.oggstr" + +[deps] + +source_file="res://sounds/item.ogg" +dest_files=[ "res://.import/item.ogg-9d12925afedc51e40ec0abb1b0542aa0.oggstr" ] + +[params] + +loop=true +loop_offset=0 diff --git a/sounds/jump.ogg b/sounds/jump.ogg new file mode 100644 index 0000000..034cee2 Binary files /dev/null and b/sounds/jump.ogg differ diff --git a/sounds/jump.ogg.import b/sounds/jump.ogg.import new file mode 100644 index 0000000..3b93166 --- /dev/null +++ b/sounds/jump.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/jump.ogg-de8df8640ff526968292c23fe5ec784f.oggstr" + +[deps] + +source_file="res://sounds/jump.ogg" +dest_files=[ "res://.import/jump.ogg-de8df8640ff526968292c23fe5ec784f.oggstr" ] + +[params] + +loop=true +loop_offset=0 diff --git a/sounds/pickaxe.ogg b/sounds/pickaxe.ogg new file mode 100644 index 0000000..1689206 Binary files /dev/null and b/sounds/pickaxe.ogg differ diff --git a/sounds/pickaxe.ogg.import b/sounds/pickaxe.ogg.import new file mode 100644 index 0000000..2037883 --- /dev/null +++ b/sounds/pickaxe.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/pickaxe.ogg-660fd619fe121f210ac6f9430a16ab5c.oggstr" + +[deps] + +source_file="res://sounds/pickaxe.ogg" +dest_files=[ "res://.import/pickaxe.ogg-660fd619fe121f210ac6f9430a16ab5c.oggstr" ] + +[params] + +loop=true +loop_offset=0 diff --git a/sounds/zone.ogg b/sounds/zone.ogg new file mode 100644 index 0000000..827a6d7 Binary files /dev/null and b/sounds/zone.ogg differ diff --git a/sounds/zone.ogg.import b/sounds/zone.ogg.import new file mode 100644 index 0000000..e9c4a4c --- /dev/null +++ b/sounds/zone.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/zone.ogg-bc2bc36f8117bfa094934330d5ee9201.oggstr" + +[deps] + +source_file="res://sounds/zone.ogg" +dest_files=[ "res://.import/zone.ogg-bc2bc36f8117bfa094934330d5ee9201.oggstr" ] + +[params] + +loop=true +loop_offset=0