More work on pawn select sounds and controls.
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://fqnkbcrbpi0s"
|
||||
path="res://.godot/imported/2 BROKEN - CK - BEAM Wood Ceiling Drop On Concrete.wav-b130d790fd66e924ea3ef416a43bf52a.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://audio/sounds/2 BROKEN - CK - BEAM Wood Ceiling Drop On Concrete.wav"
|
||||
dest_files=["res://.godot/imported/2 BROKEN - CK - BEAM Wood Ceiling Drop On Concrete.wav-b130d790fd66e924ea3ef416a43bf52a.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_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
BIN
audio/sounds/TomWinandySFX_UI_ScifiTech_Start_06.wav
Normal file
BIN
audio/sounds/TomWinandySFX_UI_ScifiTech_Start_06.wav
Normal file
Binary file not shown.
24
audio/sounds/TomWinandySFX_UI_ScifiTech_Start_06.wav.import
Normal file
24
audio/sounds/TomWinandySFX_UI_ScifiTech_Start_06.wav.import
Normal file
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://doxsdpdc7yh7s"
|
||||
path="res://.godot/imported/TomWinandySFX_UI_ScifiTech_Start_06.wav-2fd4fc0493e2662e1c87ca9b1847020f.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://audio/sounds/TomWinandySFX_UI_ScifiTech_Start_06.wav"
|
||||
dest_files=["res://.godot/imported/TomWinandySFX_UI_ScifiTech_Start_06.wav-2fd4fc0493e2662e1c87ca9b1847020f.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_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
BIN
audio/sounds/sci-fi_forcefield_hum_loop_02.wav
Normal file
BIN
audio/sounds/sci-fi_forcefield_hum_loop_02.wav
Normal file
Binary file not shown.
24
audio/sounds/sci-fi_forcefield_hum_loop_02.wav.import
Normal file
24
audio/sounds/sci-fi_forcefield_hum_loop_02.wav.import
Normal file
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://blbk74d50ldut"
|
||||
path="res://.godot/imported/sci-fi_forcefield_hum_loop_02.wav-b6f350f84c81f982c11276d57ed443aa.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://audio/sounds/sci-fi_forcefield_hum_loop_02.wav"
|
||||
dest_files=["res://.godot/imported/sci-fi_forcefield_hum_loop_02.wav-b6f350f84c81f982c11276d57ed443aa.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_mode=2
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
@@ -32,6 +32,13 @@ Gas Square
|
||||
- gas_leak_med_burst_01.wav
|
||||
Reload - sci-fi_weapon_reload_03.wav
|
||||
Disarm Tap - metal_tiny_hit_impact_01.wav
|
||||
FP Fling - sci-fi_forcefield_hum_loop_02.wav
|
||||
|
||||
****TomWinandy
|
||||
FP Startup - TomWinandySFX UI ScifiTech Start 06.wav
|
||||
|
||||
****Sonniss.com
|
||||
Wall Impact - BEAM Wood Ceiling Drop On Concrete.wav
|
||||
|
||||
****OTBTechno
|
||||
Trap Alert - 134688__otbtechno__bike-bell.wav
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
[gd_scene load_steps=11 format=3 uid="uid://ck4x56txf676a"]
|
||||
[gd_scene load_steps=21 format=3 uid="uid://ck4x56txf676a"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://grs3nyom325o" path="res://scripts/character_select.gd" id="1_bow2h"]
|
||||
[ext_resource type="Script" uid="uid://blljmwvft1g8m" path="res://scripts/pawn_display.gd" id="2_5wdeo"]
|
||||
[ext_resource type="Texture2D" uid="uid://dri0a20l6kpbj" path="res://visuals/images/icon.svg" id="2_uxcyu"]
|
||||
[ext_resource type="AudioStream" uid="uid://vcatohtmt8bk" path="res://audio/music/16 - Character Select.mp3" id="3_bow2h"]
|
||||
[ext_resource type="Texture2D" uid="uid://lttjm6mhx2nx" path="res://visuals/images/chselector.png" id="3_uxcyu"]
|
||||
[ext_resource type="Script" uid="uid://qwyhu0gexeah" path="res://scripts/cs_trap_display.gd" id="3_w1hxv"]
|
||||
[ext_resource type="Script" uid="uid://cu7ho7656m6hp" path="res://scripts/pawn_selector.gd" id="6_5cdo8"]
|
||||
[ext_resource type="AudioStream" uid="uid://cwmfd8ov3lj1h" path="res://audio/sounds/menu select.wav" id="7_bqp8h"]
|
||||
[ext_resource type="AudioStream" uid="uid://doelc8yt5snc2" path="res://audio/sounds/Keypad A.wav" id="8_5cdo8"]
|
||||
|
||||
[sub_resource type="Shader" id="Shader_fa52j"]
|
||||
code = "shader_type canvas_item;
|
||||
@@ -70,6 +76,62 @@ colors = PackedColorArray(1, 1, 1, 1)
|
||||
gradient = SubResource("Gradient_w1hxv")
|
||||
width = 1
|
||||
|
||||
[sub_resource type="Animation" id="Animation_fa52j"]
|
||||
resource_name = "selecting"
|
||||
length = 0.2667
|
||||
loop_mode = 1
|
||||
step = 0.0168
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:visible")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.0001, 0.13333334, 0.26666668),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [true, true, false, true]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_5wdeo"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:visible")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_w1hxv"]
|
||||
resource_name = "selected"
|
||||
step = 0.0168
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:visible")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_bqp8h"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_5wdeo"),
|
||||
&"selected": SubResource("Animation_w1hxv"),
|
||||
&"selecting": SubResource("Animation_fa52j")
|
||||
}
|
||||
|
||||
[node name="Control" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
@@ -87,14 +149,16 @@ anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Panel" type="Panel" parent="Panel"]
|
||||
[node name="P1PawnDisplay" type="Panel" parent="Panel"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
offset_left = 94.0
|
||||
offset_top = 96.0
|
||||
offset_right = 794.0
|
||||
offset_bottom = 796.0
|
||||
script = ExtResource("2_5wdeo")
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="Panel/Panel"]
|
||||
[node name="TextureRect" type="TextureRect" parent="Panel/P1PawnDisplay"]
|
||||
material = SubResource("ShaderMaterial_uxcyu")
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
@@ -105,14 +169,15 @@ grow_vertical = 2
|
||||
texture = SubResource("GradientTexture1D_fa52j")
|
||||
expand_mode = 1
|
||||
|
||||
[node name="Control" type="Control" parent="Panel/Panel"]
|
||||
[node name="Control" type="Control" parent="Panel/P1PawnDisplay"]
|
||||
anchors_preset = 0
|
||||
offset_left = 108.0
|
||||
offset_top = 286.0
|
||||
offset_right = 392.0
|
||||
offset_bottom = 350.0
|
||||
|
||||
[node name="Label" type="Label" parent="Panel/Panel/Control"]
|
||||
[node name="PawnName" type="Label" parent="Panel/P1PawnDisplay/Control"]
|
||||
unique_name_in_owner = true
|
||||
modulate = Color(0, 0.3254902, 1, 1)
|
||||
layout_mode = 0
|
||||
offset_left = 37.0
|
||||
@@ -123,7 +188,7 @@ theme_override_font_sizes/font_size = 48
|
||||
text = "NAME GOES HERE"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Panel/Panel/Control"]
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Panel/P1PawnDisplay/Control"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
@@ -137,17 +202,20 @@ offset_bottom = 394.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
|
||||
[node name="Panel" type="PanelContainer" parent="Panel/Panel/Control/VBoxContainer"]
|
||||
[node name="Panel" type="PanelContainer" parent="Panel/P1PawnDisplay/Control/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Panel/Panel/Control/VBoxContainer/Panel"]
|
||||
[node name="TrapContainer" type="HBoxContainer" parent="Panel/P1PawnDisplay/Control/VBoxContainer/Panel"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="Panel/Panel/Control/VBoxContainer/Panel/HBoxContainer"]
|
||||
[node name="TextureRect" type="TextureRect" parent="Panel/P1PawnDisplay/Control/VBoxContainer/Panel/TrapContainer"]
|
||||
custom_minimum_size = Vector2(92, 64)
|
||||
layout_mode = 2
|
||||
expand_mode = 1
|
||||
script = ExtResource("3_w1hxv")
|
||||
|
||||
[node name="Label" type="Label" parent="Panel/Panel/Control/VBoxContainer/Panel/HBoxContainer/TextureRect"]
|
||||
[node name="Label" type="Label" parent="Panel/P1PawnDisplay/Control/VBoxContainer/Panel/TrapContainer/TextureRect"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 3
|
||||
anchor_left = 1.0
|
||||
@@ -161,11 +229,13 @@ grow_vertical = 0
|
||||
text = "##"
|
||||
horizontal_alignment = 2
|
||||
|
||||
[node name="TextureRect2" type="TextureRect" parent="Panel/Panel/Control/VBoxContainer/Panel/HBoxContainer"]
|
||||
[node name="TextureRect2" type="TextureRect" parent="Panel/P1PawnDisplay/Control/VBoxContainer/Panel/TrapContainer"]
|
||||
custom_minimum_size = Vector2(92, 64)
|
||||
layout_mode = 2
|
||||
expand_mode = 1
|
||||
script = ExtResource("3_w1hxv")
|
||||
|
||||
[node name="Label" type="Label" parent="Panel/Panel/Control/VBoxContainer/Panel/HBoxContainer/TextureRect2"]
|
||||
[node name="Label" type="Label" parent="Panel/P1PawnDisplay/Control/VBoxContainer/Panel/TrapContainer/TextureRect2"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 3
|
||||
anchor_left = 1.0
|
||||
@@ -179,11 +249,13 @@ grow_vertical = 0
|
||||
text = "##"
|
||||
horizontal_alignment = 2
|
||||
|
||||
[node name="TextureRect3" type="TextureRect" parent="Panel/Panel/Control/VBoxContainer/Panel/HBoxContainer"]
|
||||
[node name="TextureRect3" type="TextureRect" parent="Panel/P1PawnDisplay/Control/VBoxContainer/Panel/TrapContainer"]
|
||||
custom_minimum_size = Vector2(92, 64)
|
||||
layout_mode = 2
|
||||
expand_mode = 1
|
||||
script = ExtResource("3_w1hxv")
|
||||
|
||||
[node name="Label" type="Label" parent="Panel/Panel/Control/VBoxContainer/Panel/HBoxContainer/TextureRect3"]
|
||||
[node name="Label" type="Label" parent="Panel/P1PawnDisplay/Control/VBoxContainer/Panel/TrapContainer/TextureRect3"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 3
|
||||
anchor_left = 1.0
|
||||
@@ -271,6 +343,7 @@ layout_mode = 2
|
||||
[node name="TextureRect" type="TextureRect" parent="Panel/Panel2/Control/VBoxContainer/Panel/HBoxContainer"]
|
||||
custom_minimum_size = Vector2(92, 64)
|
||||
layout_mode = 2
|
||||
expand_mode = 1
|
||||
|
||||
[node name="Label" type="Label" parent="Panel/Panel2/Control/VBoxContainer/Panel/HBoxContainer/TextureRect"]
|
||||
layout_mode = 1
|
||||
@@ -289,6 +362,7 @@ horizontal_alignment = 2
|
||||
[node name="TextureRect2" type="TextureRect" parent="Panel/Panel2/Control/VBoxContainer/Panel/HBoxContainer"]
|
||||
custom_minimum_size = Vector2(92, 64)
|
||||
layout_mode = 2
|
||||
expand_mode = 1
|
||||
|
||||
[node name="Label" type="Label" parent="Panel/Panel2/Control/VBoxContainer/Panel/HBoxContainer/TextureRect2"]
|
||||
layout_mode = 1
|
||||
@@ -307,6 +381,7 @@ horizontal_alignment = 2
|
||||
[node name="TextureRect3" type="TextureRect" parent="Panel/Panel2/Control/VBoxContainer/Panel/HBoxContainer"]
|
||||
custom_minimum_size = Vector2(92, 64)
|
||||
layout_mode = 2
|
||||
expand_mode = 1
|
||||
|
||||
[node name="Label" type="Label" parent="Panel/Panel2/Control/VBoxContainer/Panel/HBoxContainer/TextureRect3"]
|
||||
layout_mode = 1
|
||||
@@ -660,6 +735,31 @@ anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="SelectorStart" type="Control" parent="Panel2"]
|
||||
unique_name_in_owner = true
|
||||
anchors_preset = 0
|
||||
offset_left = 438.0
|
||||
offset_top = 40.0
|
||||
offset_right = 478.0
|
||||
offset_bottom = 80.0
|
||||
|
||||
[node name="Selector" type="TextureRect" parent="Panel2"]
|
||||
unique_name_in_owner = true
|
||||
texture_filter = 1
|
||||
layout_mode = 0
|
||||
offset_left = 438.0
|
||||
offset_top = 40.0
|
||||
offset_right = 608.0
|
||||
offset_bottom = 210.0
|
||||
texture = ExtResource("3_uxcyu")
|
||||
script = ExtResource("6_5cdo8")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="Panel2/Selector"]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_bqp8h")
|
||||
}
|
||||
autoplay = "selecting"
|
||||
|
||||
[node name="Panel3" type="Panel" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 10
|
||||
@@ -685,4 +785,13 @@ horizontal_alignment = 1
|
||||
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource("3_bow2h")
|
||||
volume_db = -5.0
|
||||
autoplay = true
|
||||
|
||||
[node name="SelectSound" type="AudioStreamPlayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
stream = ExtResource("7_bqp8h")
|
||||
|
||||
[node name="SwitchSound" type="AudioStreamPlayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
stream = ExtResource("8_5cdo8")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
extends Control
|
||||
|
||||
var pawns = [
|
||||
var pawns : Array[PawnData] = [
|
||||
preload("res://data/pawns/van_reily.tres"),
|
||||
preload("res://data/pawns/lou_riche.tres"),
|
||||
preload("res://data/pawns/tico.tres"),
|
||||
@@ -8,3 +8,54 @@ var pawns = [
|
||||
preload("res://data/pawns/abdoll_relin.tres"),
|
||||
preload("res://data/pawns/tenrou_ugetsu.tres")
|
||||
]
|
||||
|
||||
var selector_wait : float = 0
|
||||
var selection : int = 0
|
||||
var selected : int = -1
|
||||
@onready var selector = %Selector
|
||||
@onready var selector_start : Control = %SelectorStart
|
||||
@onready var p1_pawn_display : PawnDisplay = %P1PawnDisplay
|
||||
@onready var switch_sound : AudioStreamPlayer = %SwitchSound
|
||||
@onready var select_sound : AudioStreamPlayer = %SelectSound
|
||||
|
||||
func _ready() -> void:
|
||||
#Set up each pawn on bottom
|
||||
#Highlight P1 pawn as 0
|
||||
change_display(1, 0)
|
||||
pass
|
||||
|
||||
|
||||
func _process(delta : float) -> void:
|
||||
if selected != -1:
|
||||
return
|
||||
|
||||
if Input.is_action_just_pressed("ui_accept"):
|
||||
selected = selection
|
||||
selector.play_animation("selected")
|
||||
select_sound.play()
|
||||
|
||||
if selector_wait > 0:
|
||||
selector_wait -= delta
|
||||
return
|
||||
var input_vector = Input.get_vector("west","east","north","south")
|
||||
var move_dir : Vector2 = Vector2.ZERO
|
||||
|
||||
if input_vector.x < 0:
|
||||
move_dir.x -= 1
|
||||
|
||||
if input_vector.x > 0:
|
||||
move_dir.x += 1
|
||||
|
||||
if move_dir.x != 0:
|
||||
selection = wrapi(selection + sign(move_dir.x),0, len(pawns))
|
||||
change_display(1, selection)
|
||||
selector.position = selector_start.position + Vector2(175 * selection, 0)
|
||||
switch_sound.play()
|
||||
selector_wait = 0.25
|
||||
|
||||
func change_display(player : int, selection: int) -> void:
|
||||
var pd : PawnDisplay
|
||||
if player == 1:
|
||||
pd = p1_pawn_display
|
||||
pd.set_pawn_name(pawns[selection].name)
|
||||
pd.set_traps(pawns[selection].starting_traps)
|
||||
|
||||
7
scripts/cs_trap_display.gd
Normal file
7
scripts/cs_trap_display.gd
Normal file
@@ -0,0 +1,7 @@
|
||||
extends TextureRect
|
||||
|
||||
@onready var qty_label : Label = $Label
|
||||
|
||||
func setup(type : Trap.Type, qty : int) -> void:
|
||||
texture = Trap.trap_icons[type]
|
||||
qty_label.text = str(qty)
|
||||
1
scripts/cs_trap_display.gd.uid
Normal file
1
scripts/cs_trap_display.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://qwyhu0gexeah
|
||||
20
scripts/pawn_display.gd
Normal file
20
scripts/pawn_display.gd
Normal file
@@ -0,0 +1,20 @@
|
||||
class_name PawnDisplay extends Panel
|
||||
|
||||
@onready var pawn_name : Label = %PawnName
|
||||
@onready var trap_container : HBoxContainer = %TrapContainer
|
||||
var traps : Array = []
|
||||
|
||||
func _ready() -> void:
|
||||
for child in trap_container.get_children():
|
||||
traps.append(child)
|
||||
|
||||
func set_traps(trap_list : Array[TrapSet]) -> void:
|
||||
var tcount = 0
|
||||
if len(trap_list) != 3:
|
||||
return
|
||||
for trap in traps:
|
||||
trap.setup(trap_list[tcount].type, trap_list[tcount].qty)
|
||||
tcount+=1
|
||||
|
||||
func set_pawn_name(name : String) -> void:
|
||||
pawn_name.text = name
|
||||
1
scripts/pawn_display.gd.uid
Normal file
1
scripts/pawn_display.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://blljmwvft1g8m
|
||||
6
scripts/pawn_selector.gd
Normal file
6
scripts/pawn_selector.gd
Normal file
@@ -0,0 +1,6 @@
|
||||
extends TextureRect
|
||||
|
||||
@onready var anim_player : AnimationPlayer = $AnimationPlayer
|
||||
|
||||
func play_animation(anim : String) -> void:
|
||||
anim_player.play(anim)
|
||||
1
scripts/pawn_selector.gd.uid
Normal file
1
scripts/pawn_selector.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cu7ho7656m6hp
|
||||
@@ -19,6 +19,8 @@ const disarm_trap_modal = preload("res://templates/disarm_trap_modal.tscn")
|
||||
@onready var trap_sound : AudioStreamPlayer3D = $TrapSound
|
||||
@onready var detonate_sound : AudioStreamPlayer3D = $DetonateSound
|
||||
@onready var detect_sound : AudioStreamPlayer3D = $DetectSound
|
||||
@onready var fling_sound : AudioStreamPlayer3D = $FlingSound
|
||||
@onready var crash_sound : AudioStreamPlayer3D = $CrashSound
|
||||
@onready var reload_sound : AudioStreamPlayer3D = $PawnBody/ReloadSound
|
||||
@onready var detect_icon : Sprite3D = $DetectIcon
|
||||
|
||||
@@ -467,11 +469,14 @@ func fling(direction : Vector3, speed : float) -> void:
|
||||
state = State.FLUNG
|
||||
fling_direction = direction
|
||||
fling_speed = speed
|
||||
fling_sound.play()
|
||||
|
||||
func knockdown(direction : Vector3) -> void:
|
||||
state = State.KNOCKDOWN
|
||||
input_locked = true
|
||||
body.look_at(Vector3(0,1,0), direction)
|
||||
fling_sound.stop()
|
||||
crash_sound.play()
|
||||
var knockdown_tween = create_tween()
|
||||
knockdown_tween.tween_interval(1.5)
|
||||
knockdown_tween.tween_property(self, "state", State.NORMAL, 0)
|
||||
|
||||
@@ -23,6 +23,10 @@ func _ready() -> void:
|
||||
]
|
||||
add_child(player)
|
||||
generate_trap(Trap.Type.FORCE_PANEL, Vector3(-1, 0, 0), Vector3i(5,0,2))
|
||||
generate_trap(Trap.Type.FORCE_PANEL, Vector3(0, 0, -1), Vector3i(-3,0,2))
|
||||
generate_trap(Trap.Type.MINE, Vector3(0, 0, 0), Vector3i(-3,0,-4))
|
||||
generate_trap(Trap.Type.BOMB, Vector3(0, 0, 0), Vector3i(-2,0,-4))
|
||||
generate_trap(Trap.Type.BOMB, Vector3(0, 0, 0), Vector3i(-4,0,-4))
|
||||
player.setup(traps)
|
||||
|
||||
func is_square_detected(crd) -> bool:
|
||||
|
||||
@@ -30,6 +30,7 @@ const bomb_explosion_template = preload("res://templates/explosion.tscn")
|
||||
const mine_explosion_template = preload("res://templates/explosion.tscn")
|
||||
const switch_explosion_template = preload("res://templates/explosion.tscn")
|
||||
const gas_emitter_template = preload("res://templates/gas_emitter.tscn")
|
||||
const force_activate_sound = preload("res://audio/sounds/TomWinandySFX_UI_ScifiTech_Start_06.wav")
|
||||
|
||||
@onready var range_area : Area3D = %RangeArea
|
||||
@onready var range_shape : BoxShape3D = %RangeShape.shape
|
||||
@@ -107,7 +108,7 @@ func _ready() -> void:
|
||||
Type.FORCE_PANEL:
|
||||
var r : float = atan2(direction.z, -direction.x) + PI/2
|
||||
force_strip.rotate_y(r)
|
||||
force_strip.visible = true
|
||||
force_strip.visible = owns_trap
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
just_revealed = false
|
||||
@@ -119,6 +120,7 @@ func activate() -> void:
|
||||
var explode : bool = false
|
||||
match(type):
|
||||
Type.FORCE_PANEL:
|
||||
Game.oneshot(force_activate_sound)
|
||||
for body in get_overlapping_bodies():
|
||||
body.fling(direction, 5.0)
|
||||
Type.MINE:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=30 format=3 uid="uid://c8xf3qawk5c6u"]
|
||||
[gd_scene load_steps=32 format=3 uid="uid://c8xf3qawk5c6u"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bcs7ygh6s3l35" path="res://scripts/player.gd" id="1_a5wj7"]
|
||||
[ext_resource type="Script" uid="uid://wye3mat5y5yg" path="res://scripts/pawn_body.gd" id="2_ac3v1"]
|
||||
@@ -18,6 +18,8 @@
|
||||
[ext_resource type="AudioStream" uid="uid://dgftxjb34d2ph" path="res://audio/sounds/Hitech Shot B.wav" id="10_ghbft"]
|
||||
[ext_resource type="AudioStream" uid="uid://bguwdvatsf87l" path="res://audio/sounds/Hitech Shot C.wav" id="11_fuq8x"]
|
||||
[ext_resource type="AudioStream" uid="uid://cw31ymbqgqcq2" path="res://audio/sounds/sci-fi_weapon_reload_03.wav" id="13_fuq8x"]
|
||||
[ext_resource type="AudioStream" uid="uid://blbk74d50ldut" path="res://audio/sounds/sci-fi_forcefield_hum_loop_02.wav" id="16_yixtd"]
|
||||
[ext_resource type="AudioStream" uid="uid://fqnkbcrbpi0s" path="res://audio/sounds/2 BROKEN - CK - BEAM Wood Ceiling Drop On Concrete.wav" id="17_vmejf"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_y646j"]
|
||||
next_pass = ExtResource("2_j3lta")
|
||||
@@ -286,6 +288,12 @@ script = ExtResource("2_sfa2f")
|
||||
[node name="TrapSound" type="AudioStreamPlayer3D" parent="."]
|
||||
stream = ExtResource("3_sfa2f")
|
||||
|
||||
[node name="FlingSound" type="AudioStreamPlayer3D" parent="."]
|
||||
stream = ExtResource("16_yixtd")
|
||||
|
||||
[node name="CrashSound" type="AudioStreamPlayer3D" parent="."]
|
||||
stream = ExtResource("17_vmejf")
|
||||
|
||||
[node name="AudioListener3D" type="AudioListener3D" parent="."]
|
||||
current = true
|
||||
|
||||
|
||||
BIN
visuals/images/chselector.png
Normal file
BIN
visuals/images/chselector.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 577 B |
40
visuals/images/chselector.png.import
Normal file
40
visuals/images/chselector.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://lttjm6mhx2nx"
|
||||
path="res://.godot/imported/chselector.png-d3b88b8d7d6bb96938cec1e048790809.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://visuals/images/chselector.png"
|
||||
dest_files=["res://.godot/imported/chselector.png-d3b88b8d7d6bb96938cec1e048790809.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
Reference in New Issue
Block a user