added scream
This commit is contained in:
parent
8250f073a7
commit
571197baa7
@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
- https://freesound.org/people/craigsmith/sounds/483320/
|
- https://freesound.org/people/craigsmith/sounds/483320/
|
||||||
- https://freesound.org/people/Logicogonist/sounds/685293/
|
- https://freesound.org/people/Logicogonist/sounds/685293/
|
||||||
|
- https://www.youtube.com/watch?v=PP7WJL2JtLs (NOT CC0)
|
||||||
|
- https://www.youtube.com/watch?v=vG2I7r4qlEA (NOT CC0)
|
||||||
|
|
||||||
# Fonts
|
# Fonts
|
||||||
|
|
||||||
|
BIN
godot/assets/sounds/scream_0.wav
Normal file
BIN
godot/assets/sounds/scream_0.wav
Normal file
Binary file not shown.
24
godot/assets/sounds/scream_0.wav.import
Normal file
24
godot/assets/sounds/scream_0.wav.import
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamWAV"
|
||||||
|
uid="uid://cue207ror7nu1"
|
||||||
|
path="res://.godot/imported/scream_0.wav-02df26ebad5a19c7729367e401d0d455.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/sounds/scream_0.wav"
|
||||||
|
dest_files=["res://.godot/imported/scream_0.wav-02df26ebad5a19c7729367e401d0d455.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
godot/assets/sounds/scream_1.wav
Normal file
BIN
godot/assets/sounds/scream_1.wav
Normal file
Binary file not shown.
24
godot/assets/sounds/scream_1.wav.import
Normal file
24
godot/assets/sounds/scream_1.wav.import
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamWAV"
|
||||||
|
uid="uid://bpwo61rj7l875"
|
||||||
|
path="res://.godot/imported/scream_1.wav-31f38f99f8e9098584bf4fec372c5d41.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/sounds/scream_1.wav"
|
||||||
|
dest_files=["res://.godot/imported/scream_1.wav-31f38f99f8e9098584bf4fec372c5d41.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
|
@ -61,20 +61,24 @@ transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0,
|
|||||||
[node name="player_3" parent="players" instance=ExtResource("6_8vhnl")]
|
[node name="player_3" parent="players" instance=ExtResource("6_8vhnl")]
|
||||||
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 4, 0, 0)
|
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 4, 0, 0)
|
||||||
|
|
||||||
[node name="Camera3D" type="Camera3D" parent="."]
|
[node name="CAMERA" type="Camera3D" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
transform = Transform3D(1, 0, 0, 0, 0.910084, 0.414423, 0, -0.414423, 0.910084, 0, 3.4199, 0)
|
transform = Transform3D(1, 0, 0, 0, 0.910084, 0.414423, 0, -0.414423, 0.910084, 0, 3.4199, 0)
|
||||||
fov = 60.0
|
fov = 39.7
|
||||||
|
size = 0.013
|
||||||
script = ExtResource("2_joe7c")
|
script = ExtResource("2_joe7c")
|
||||||
|
|
||||||
[node name="RULE_ENFORCEMENT" parent="Camera3D" instance=ExtResource("7_0rqic")]
|
[node name="RULE_ENFORCEMENT" parent="CAMERA" instance=ExtResource("7_0rqic")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
transform = Transform3D(-0.0475354, -0.0535728, 0.270738, 0.266451, 0.0626881, 0.0591871, -0.0719257, 0.267636, 0.0403304, 0.0257539, -0.692888, -4.06508)
|
transform = Transform3D(-0.0475354, -0.0535728, 0.270738, 0.266451, 0.0626881, 0.0591871, -0.0719257, 0.267636, 0.0403304, 0.0257539, -0.692888, -4.06508)
|
||||||
|
|
||||||
[node name="UI" type="Control" parent="."]
|
[node name="UI" type="Control" parent="."]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
anchors_preset = 0
|
anchors_preset = 15
|
||||||
offset_right = 40.0
|
anchor_right = 1.0
|
||||||
offset_bottom = 40.0
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
[node name="PanelContainer" type="PanelContainer" parent="UI"]
|
[node name="PanelContainer" type="PanelContainer" parent="UI"]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
@ -84,9 +88,11 @@ theme_override_styles/panel = SubResource("StyleBoxEmpty_sp4xh")
|
|||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="UI/PanelContainer"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="UI/PanelContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
alignment = 2
|
||||||
|
|
||||||
[node name="HBoxContainer" type="HBoxContainer" parent="UI/PanelContainer/VBoxContainer"]
|
[node name="HBoxContainer" type="HBoxContainer" parent="UI/PanelContainer/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
alignment = 2
|
||||||
|
|
||||||
[node name="QUESTION" type="Label" parent="UI/PanelContainer/VBoxContainer/HBoxContainer"]
|
[node name="QUESTION" type="Label" parent="UI/PanelContainer/VBoxContainer/HBoxContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
@ -111,4 +117,8 @@ drag_and_drop_selection_enabled = false
|
|||||||
flat = true
|
flat = true
|
||||||
caret_blink = true
|
caret_blink = true
|
||||||
|
|
||||||
|
[node name="SCREAM" type="AudioStreamPlayer3D" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
panning_strength = 0.0
|
||||||
|
|
||||||
[connection signal="text_submitted" from="UI/PanelContainer/VBoxContainer/HBoxContainer/ANSWER" to="." method="_on_answer_text_submitted"]
|
[connection signal="text_submitted" from="UI/PanelContainer/VBoxContainer/HBoxContainer/ANSWER" to="." method="_on_answer_text_submitted"]
|
||||||
|
@ -36,7 +36,7 @@ func _physics_process(_delta: float) -> void:
|
|||||||
|
|
||||||
elif clock > wait_time:
|
elif clock > wait_time:
|
||||||
if %ANSWER.text == "":
|
if %ANSWER.text == "":
|
||||||
%ANSWER.text = str(GLOBALVARS.current_solution) if is_correct else str(GLOBALVARS.current_solution+randi_range(-10,10))
|
%ANSWER.text = str(GLOBALVARS.current_solution) if is_correct else str(GLOBALVARS.current_solution+randi_range(-2,2))
|
||||||
elif clock > wait_time + 30:
|
elif clock > wait_time + 30:
|
||||||
%ANSWER.emit_signal("text_submitted",%ANSWER.text)
|
%ANSWER.emit_signal("text_submitted",%ANSWER.text)
|
||||||
currently_executing = false
|
currently_executing = false
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
var cooldown:int = 0
|
var cooldown:int = 0
|
||||||
|
static var SCREAM_ARRAY:Array = [0,1]
|
||||||
|
|
||||||
func _determine_seconds_left() -> float:
|
func _determine_seconds_left() -> float:
|
||||||
var difficulty_calc:float = 20-float(GLOBALVARS.difficulty)
|
var difficulty_calc:float = 20-float(GLOBALVARS.difficulty)
|
||||||
@ -16,6 +17,8 @@ func _on_answer_text_submitted(_new_text: String) -> void:
|
|||||||
GLOBALVARS.seconds_left = _determine_seconds_left()
|
GLOBALVARS.seconds_left = _determine_seconds_left()
|
||||||
_generate_question()
|
_generate_question()
|
||||||
else:
|
else:
|
||||||
|
%SCREAM.stream = load("res://assets/sounds/scream_%s.wav" % SCREAM_ARRAY.pick_random())
|
||||||
|
%SCREAM.play()
|
||||||
%RULE_ENFORCEMENT.explode()
|
%RULE_ENFORCEMENT.explode()
|
||||||
cooldown = 60
|
cooldown = 60
|
||||||
GLOBALVARS.rotation_paused = true
|
GLOBALVARS.rotation_paused = true
|
||||||
@ -41,8 +44,8 @@ func _generate_question() -> void:
|
|||||||
GLOBALVARS.current_solution = x-y
|
GLOBALVARS.current_solution = x-y
|
||||||
GLOBALVARS.current_operand = "-"
|
GLOBALVARS.current_operand = "-"
|
||||||
elif rand_int == 2:
|
elif rand_int == 2:
|
||||||
x = randi_range(0,10) # simplify multiplication
|
x = randi_range(0,15) # simplify multiplication
|
||||||
y = randi_range(0,10)
|
y = randi_range(0,15)
|
||||||
GLOBALVARS.current_solution = x*y
|
GLOBALVARS.current_solution = x*y
|
||||||
GLOBALVARS.current_operand = "*"
|
GLOBALVARS.current_operand = "*"
|
||||||
elif rand_int == 3:
|
elif rand_int == 3:
|
||||||
@ -84,13 +87,14 @@ func _physics_process(_delta: float) -> void:
|
|||||||
GLOBALVARS.selected_player = (GLOBALVARS.selected_player+1)%4
|
GLOBALVARS.selected_player = (GLOBALVARS.selected_player+1)%4
|
||||||
|
|
||||||
_generate_question()
|
_generate_question()
|
||||||
|
%RULE_ENFORCEMENT.reset_rule_enforcement_device()
|
||||||
|
GLOBALVARS.rotation_paused = false
|
||||||
elif 0 in GLOBALVARS.players_remaining:
|
elif 0 in GLOBALVARS.players_remaining:
|
||||||
pass # WIN CONDITION
|
get_tree().change_scene_to_file("res://main_scenes/menu.tscn")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
get_tree().change_scene_to_file("res://main_scenes/menu.tscn")
|
get_tree().change_scene_to_file("res://main_scenes/menu.tscn")
|
||||||
|
|
||||||
GLOBALVARS.rotation_paused = false
|
|
||||||
%RULE_ENFORCEMENT.reset_rule_enforcement_device()
|
|
||||||
|
|
||||||
elif GLOBALVARS.rotation_paused:
|
elif GLOBALVARS.rotation_paused:
|
||||||
cooldown -= 1
|
cooldown -= 1
|
||||||
|
Reference in New Issue
Block a user