Zmiany
This commit is contained in:
parent
a0bce0b710
commit
c04e08e406
47
default_bus_layout.tres
Normal file
47
default_bus_layout.tres
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
[gd_resource type="AudioBusLayout" format=3 uid="uid://bcxqtqp2rqm5s"]
|
||||||
|
|
||||||
|
[sub_resource type="AudioEffectEQ10" id="EQ_plasma"]
|
||||||
|
resource_name = "Equalizer plazmy"
|
||||||
|
|
||||||
|
[sub_resource type="AudioEffectEQ10" id="EQ_machine_gun"]
|
||||||
|
resource_name = "Equalizer karabinu"
|
||||||
|
|
||||||
|
[sub_resource type="AudioEffectEQ10" id="EQ_laser"]
|
||||||
|
resource_name = "Equalizer lasera"
|
||||||
|
|
||||||
|
[sub_resource type="AudioEffectEQ10" id="EQ_missile"]
|
||||||
|
resource_name = "Equalizer rakiet"
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
bus/1/name = &"Plasma"
|
||||||
|
bus/1/solo = false
|
||||||
|
bus/1/mute = false
|
||||||
|
bus/1/bypass_fx = false
|
||||||
|
bus/1/volume_db = -6.0
|
||||||
|
bus/1/send = &"Master"
|
||||||
|
bus/1/effect/0/effect = SubResource("EQ_plasma")
|
||||||
|
bus/1/effect/0/enabled = true
|
||||||
|
bus/2/name = &"MachineGun"
|
||||||
|
bus/2/solo = false
|
||||||
|
bus/2/mute = false
|
||||||
|
bus/2/bypass_fx = false
|
||||||
|
bus/2/volume_db = -15.788257
|
||||||
|
bus/2/send = &"Master"
|
||||||
|
bus/2/effect/0/effect = SubResource("EQ_machine_gun")
|
||||||
|
bus/2/effect/0/enabled = true
|
||||||
|
bus/3/name = &"Laser"
|
||||||
|
bus/3/solo = false
|
||||||
|
bus/3/mute = false
|
||||||
|
bus/3/bypass_fx = false
|
||||||
|
bus/3/volume_db = -26.605057
|
||||||
|
bus/3/send = &"Master"
|
||||||
|
bus/3/effect/0/effect = SubResource("EQ_laser")
|
||||||
|
bus/3/effect/0/enabled = true
|
||||||
|
bus/4/name = &"Missile"
|
||||||
|
bus/4/solo = false
|
||||||
|
bus/4/mute = false
|
||||||
|
bus/4/bypass_fx = false
|
||||||
|
bus/4/volume_db = -6.0
|
||||||
|
bus/4/send = &"Master"
|
||||||
|
bus/4/effect/0/effect = SubResource("EQ_missile")
|
||||||
|
bus/4/effect/0/enabled = true
|
||||||
@ -216,3 +216,13 @@ DODAWANIE NASTĘPNEJ UMIEJĘTNOŚCI
|
|||||||
|
|
||||||
Maska addonów ma teraz sześć kategorii. 63 oznacza wszystkie, 32 tylko aktywne rozszerzenia.
|
Maska addonów ma teraz sześć kategorii. 63 oznacza wszystkie, 32 tylko aktywne rozszerzenia.
|
||||||
Test integracyjny: tests/abilities/active_abilities_test.tscn.
|
Test integracyjny: tests/abilities/active_abilities_test.tscn.
|
||||||
|
|
||||||
|
MIKSER DŹWIĘKÓW BRONI
|
||||||
|
|
||||||
|
Układ: res://default_bus_layout.tres (ustawiony jako domyślny w projekcie).
|
||||||
|
Panel Audio Godota: Plasma, MachineGun, Laser, Missile — każda szyna ma osobny
|
||||||
|
suwak głośności i własny AudioEffectEQ10. Kliknij efekt, aby edytować pasma equalizera
|
||||||
|
w Inspectorze. Domyślnie pasma są neutralne (0 dB), szyny mają -6 dB i wysyłają do Master.
|
||||||
|
WeaponAudio.BUS_NAMES przypisuje rodzaj broni do szyny. Głośność gracza na odtwarzaczu
|
||||||
|
wynosi 0 dB, plazma wrogów -4 dB względem szyny. Zmiana szyny Plasma obejmuje oba źródła.
|
||||||
|
Muzyka i inne dźwięki nie przechodzą przez szyny broni.
|
||||||
|
|||||||
@ -15,6 +15,10 @@ run/main_scene="res://scenes/ui/main_menu.tscn"
|
|||||||
config/features=PackedStringArray("4.7", "Forward Plus")
|
config/features=PackedStringArray("4.7", "Forward Plus")
|
||||||
config/icon="res://icon.svg"
|
config/icon="res://icon.svg"
|
||||||
|
|
||||||
|
[audio]
|
||||||
|
|
||||||
|
buses/default_bus_layout="res://default_bus_layout.tres"
|
||||||
|
|
||||||
[autoload]
|
[autoload]
|
||||||
|
|
||||||
GameState="*res://scripts/game/game_state.gd"
|
GameState="*res://scripts/game/game_state.gd"
|
||||||
|
|||||||
@ -1,17 +1,12 @@
|
|||||||
[gd_resource type="Resource" script_class="ItemAffixDefinition" load_steps=2 format=3]
|
[gd_resource type="Resource" script_class="ItemAffixDefinition" format=3 uid="uid://c2eetdapysts2"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://scripts/items/item_affix_definition.gd" id="1_affix"]
|
[ext_resource type="Script" uid="uid://cp6ucjqrac8so" path="res://scripts/items/item_affix_definition.gd" id="1_affix"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_affix")
|
script = ExtResource("1_affix")
|
||||||
affix_id = "damage_percent"
|
affix_id = "damage_percent"
|
||||||
display_name = "Obrażenia broni"
|
display_name = "Obrażenia broni"
|
||||||
stat_key = "damage_percent"
|
stat_key = "damage_percent"
|
||||||
unit = "%"
|
allowed_item_ids = null
|
||||||
selection_weight = 1.0
|
excluded_item_ids = null
|
||||||
category_mask = 63
|
incompatible_affix_ids = null
|
||||||
minimum_value_level_1 = 1
|
|
||||||
maximum_value_level_1 = 3
|
|
||||||
minimum_value_level_1000 = 25
|
|
||||||
maximum_value_level_1000 = 50
|
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
[gd_resource type="Resource" script_class="ItemDefinition" load_steps=4 format=3]
|
[gd_resource type="Resource" script_class="ItemDefinition" format=3 uid="uid://dtdl8fh8nlr0q"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://scripts/items/item_definition.gd" id="1"]
|
[ext_resource type="Script" uid="uid://d2fdtd4wjk7d" path="res://scripts/items/item_definition.gd" id="1"]
|
||||||
[ext_resource type="Script" path="res://scripts/abilities/afterburner_ability.gd" id="2"]
|
[ext_resource type="Script" uid="uid://bpaiuqwsxswii" path="res://scripts/abilities/afterburner_ability.gd" id="2"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Ability"]
|
[sub_resource type="Resource" id="Ability"]
|
||||||
script = ExtResource("2")
|
script = ExtResource("2")
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
[gd_resource type="Resource" script_class="ItemDefinition" load_steps=4 format=3]
|
[gd_resource type="Resource" script_class="ItemDefinition" format=3 uid="uid://cdctway64tj3m"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://scripts/items/item_definition.gd" id="1"]
|
[ext_resource type="Script" uid="uid://d2fdtd4wjk7d" path="res://scripts/items/item_definition.gd" id="1"]
|
||||||
[ext_resource type="Script" path="res://scripts/abilities/repair_drones_ability.gd" id="2"]
|
[ext_resource type="Script" uid="uid://bgofku10gduus" path="res://scripts/abilities/repair_drones_ability.gd" id="2"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Ability"]
|
[sub_resource type="Resource" id="Ability"]
|
||||||
script = ExtResource("2")
|
script = ExtResource("2")
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
[gd_resource type="Resource" script_class="ItemDefinition" load_steps=4 format=3]
|
[gd_resource type="Resource" script_class="ItemDefinition" format=3 uid="uid://cacthg4s2nnxi"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://scripts/items/item_definition.gd" id="1"]
|
[ext_resource type="Script" uid="uid://d2fdtd4wjk7d" path="res://scripts/items/item_definition.gd" id="1"]
|
||||||
[ext_resource type="Script" path="res://scripts/abilities/shield_charge_ability.gd" id="2"]
|
[ext_resource type="Script" uid="uid://bwka1dwxq64sl" path="res://scripts/abilities/shield_charge_ability.gd" id="2"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Ability"]
|
[sub_resource type="Resource" id="Ability"]
|
||||||
script = ExtResource("2")
|
script = ExtResource("2")
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
[ext_resource type="Script" uid="uid://bcfvflaqnmfa5" path="res://scripts/game/flight_hud.gd" id="4_hud"]
|
[ext_resource type="Script" uid="uid://bcfvflaqnmfa5" path="res://scripts/game/flight_hud.gd" id="4_hud"]
|
||||||
[ext_resource type="PackedScene" path="res://scenes/ui/ship_equipment_panel.tscn" id="5_equipment"]
|
[ext_resource type="PackedScene" path="res://scenes/ui/ship_equipment_panel.tscn" id="5_equipment"]
|
||||||
[ext_resource type="PackedScene" path="res://scenes/ui/ship_inventory_panel.tscn" id="6_inventory"]
|
[ext_resource type="PackedScene" path="res://scenes/ui/ship_inventory_panel.tscn" id="6_inventory"]
|
||||||
[ext_resource type="Script" path="res://scripts/game/scene_music_player.gd" id="8_scene_music"]
|
[ext_resource type="Script" uid="uid://dvokq8qdccw37" path="res://scripts/game/scene_music_player.gd" id="8_scene_music"]
|
||||||
[ext_resource type="PackedScene" path="res://scenes/ui/captain_panel.tscn" id="9_captain"]
|
[ext_resource type="PackedScene" path="res://scenes/ui/captain_panel.tscn" id="9_captain"]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="TopWall"]
|
[sub_resource type="RectangleShape2D" id="TopWall"]
|
||||||
@ -99,7 +99,7 @@ offset_top = 224.0
|
|||||||
offset_right = -10.0
|
offset_right = -10.0
|
||||||
offset_bottom = 504.0
|
offset_bottom = 504.0
|
||||||
grow_horizontal = 0
|
grow_horizontal = 0
|
||||||
grow_vertical = 0
|
grow_vertical = 1
|
||||||
|
|
||||||
[node name="ShipInventoryPanel" parent="HUD/HUDRoot" unique_id=1116676462 instance=ExtResource("6_inventory")]
|
[node name="ShipInventoryPanel" parent="HUD/HUDRoot" unique_id=1116676462 instance=ExtResource("6_inventory")]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
@ -115,9 +115,8 @@ offset_bottom = 128.0
|
|||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
|
|
||||||
[node name="CaptainPanel" parent="HUD/HUDRoot" instance=ExtResource("9_captain")]
|
[node name="CaptainPanel" parent="HUD/HUDRoot" unique_id=424797965 instance=ExtResource("9_captain")]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
anchors_preset = 1
|
|
||||||
anchor_left = 1.0
|
anchor_left = 1.0
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
offset_left = -270.0
|
offset_left = -270.0
|
||||||
|
|||||||
@ -85,7 +85,8 @@ func _fire_plasma(direction: Vector2) -> void:
|
|||||||
var projectile := PLASMA_PROJECTILE_SCENE.instantiate() as Area2D
|
var projectile := PLASMA_PROJECTILE_SCENE.instantiate() as Area2D
|
||||||
projectile.call("configure", global_position + direction * 28.0, direction, weapon_damage)
|
projectile.call("configure", global_position + direction * 28.0, direction, weapon_damage)
|
||||||
get_parent().add_child(projectile)
|
get_parent().add_child(projectile)
|
||||||
WEAPON_AUDIO_SCRIPT.play(get_parent(), global_position, ItemDefinition.WeaponKind.PLASMA, -10.0)
|
# Relative to the Plasma bus: enemy shots are 4 dB quieter than player shots.
|
||||||
|
WEAPON_AUDIO_SCRIPT.play(get_parent(), global_position, ItemDefinition.WeaponKind.PLASMA, -4.0)
|
||||||
|
|
||||||
func take_weapon_hit(amount: float, critical: bool) -> void:
|
func take_weapon_hit(amount: float, critical: bool) -> void:
|
||||||
take_damage(amount, critical)
|
take_damage(amount, critical)
|
||||||
|
|||||||
@ -10,7 +10,14 @@ const SOUND_PATHS := {
|
|||||||
|
|
||||||
static var _streams: Dictionary = {}
|
static var _streams: Dictionary = {}
|
||||||
|
|
||||||
static func play(parent: Node, source_position: Vector2, weapon_kind: int, volume_db: float = -6.0) -> void:
|
const BUS_NAMES := {
|
||||||
|
ItemDefinition.WeaponKind.PLASMA: &"Plasma",
|
||||||
|
ItemDefinition.WeaponKind.MACHINE_GUN: &"MachineGun",
|
||||||
|
ItemDefinition.WeaponKind.LASER: &"Laser",
|
||||||
|
ItemDefinition.WeaponKind.MISSILE: &"Missile",
|
||||||
|
}
|
||||||
|
|
||||||
|
static func play(parent: Node, source_position: Vector2, weapon_kind: int, volume_db: float = 0.0) -> void:
|
||||||
if not is_instance_valid(parent):
|
if not is_instance_valid(parent):
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -25,6 +32,7 @@ static func play(parent: Node, source_position: Vector2, weapon_kind: int, volum
|
|||||||
|
|
||||||
var player := AudioStreamPlayer2D.new()
|
var player := AudioStreamPlayer2D.new()
|
||||||
player.stream = stream
|
player.stream = stream
|
||||||
|
player.bus = BUS_NAMES[weapon_kind]
|
||||||
player.volume_db = volume_db
|
player.volume_db = volume_db
|
||||||
player.max_distance = 1500.0
|
player.max_distance = 1500.0
|
||||||
player.attenuation = 1.0
|
player.attenuation = 1.0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user