wip: tts refactor, painting animations
|
|
@ -6,16 +6,16 @@ signal auctioneer_bark
|
||||||
|
|
||||||
func _on_great_buy_button_down() -> void:
|
func _on_great_buy_button_down() -> void:
|
||||||
auctioneer_bark.emit()
|
auctioneer_bark.emit()
|
||||||
DisplayServer.tts_speak("Great buy!", turn_manager.voice_id, turn_manager.tts_volume, turn_manager.tts_pitch, bark_speed)
|
turn_manager.speak("Great buy!")
|
||||||
|
|
||||||
func _on_investment_piece_button_down() -> void:
|
func _on_investment_piece_button_down() -> void:
|
||||||
auctioneer_bark.emit()
|
auctioneer_bark.emit()
|
||||||
DisplayServer.tts_speak("Investment piece!", turn_manager.voice_id, turn_manager.tts_volume, turn_manager.tts_pitch, bark_speed)
|
turn_manager.speak("Investment piece!")
|
||||||
|
|
||||||
func _on_stunning_message_button_down() -> void:
|
func _on_stunning_message_button_down() -> void:
|
||||||
auctioneer_bark.emit()
|
auctioneer_bark.emit()
|
||||||
DisplayServer.tts_speak("Stunning message!", turn_manager.voice_id, turn_manager.tts_volume, turn_manager.tts_pitch, bark_speed)
|
turn_manager.speak("Stunning message!")
|
||||||
|
|
||||||
func _on_innovative_artist_button_down() -> void:
|
func _on_innovative_artist_button_down() -> void:
|
||||||
auctioneer_bark.emit()
|
auctioneer_bark.emit()
|
||||||
DisplayServer.tts_speak("Innovative artist!", turn_manager.voice_id, turn_manager.tts_volume, turn_manager.tts_pitch, bark_speed)
|
turn_manager.speak("Innovative artist!")
|
||||||
|
|
|
||||||
15
captions.gd
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
extends Label
|
||||||
|
class_name CaptionLabel
|
||||||
|
|
||||||
|
|
||||||
|
var _tween: Tween
|
||||||
|
|
||||||
|
|
||||||
|
func display_caption(msg: String) -> void:
|
||||||
|
text = msg
|
||||||
|
modulate = Color.WHITE
|
||||||
|
if _tween: _tween.kill()
|
||||||
|
_tween = create_tween()
|
||||||
|
_tween.tween_interval(30.0)
|
||||||
|
_tween.tween_property(self, ^'modulate', Color.TRANSPARENT, 3.0)
|
||||||
|
_tween.tween_callback(func(): _tween = null)
|
||||||
1
captions.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://sfhg7pkumnwa
|
||||||
|
|
@ -36,24 +36,24 @@ func _ready() -> void:
|
||||||
desk.gavel.gavel_hit.connect(_handle_gavel_hit)
|
desk.gavel.gavel_hit.connect(_handle_gavel_hit)
|
||||||
|
|
||||||
#paintings_total = randi_range(7,10)
|
#paintings_total = randi_range(7,10)
|
||||||
target_sales = randi_range(2,5) * sales_magnitude
|
target_sales = randi_range(2, 5) * sales_magnitude
|
||||||
|
|
||||||
var new_painting = 0
|
var new_painting := 0
|
||||||
var new_painting_value: int
|
var new_painting_value: int
|
||||||
|
|
||||||
while new_painting < paintings_total:
|
while new_painting < paintings_total:
|
||||||
new_painting_value = (target_sales/randf_range(paintings_total - 2, paintings_total + 2))
|
@warning_ignore('integer_division')
|
||||||
|
new_painting_value = target_sales / randi_range(paintings_total - 2, paintings_total + 2)
|
||||||
new_painting_value = snappedi(new_painting_value, single_painting_magnitude)
|
new_painting_value = snappedi(new_painting_value, single_painting_magnitude)
|
||||||
print(str(new_painting_value))
|
print(str(new_painting_value))
|
||||||
paintings.append(new_painting_value)
|
paintings.append(new_painting_value)
|
||||||
new_painting += 1
|
new_painting += 1
|
||||||
|
|
||||||
print(paintings)
|
print(paintings)
|
||||||
print("You have " + str(paintings_total) + " paintings. Sell them for at least $" + str(target_sales) + " or face the consequences!")
|
|
||||||
print("Hit the gavel and input the starting price to begin!")
|
|
||||||
|
|
||||||
DisplayServer.tts_speak("You have " + str(paintings_total) + " paintings. Sell them fast for at least $" + str(target_sales) + " or face the consequences!", turn_manager.voice_id, turn_manager.tts_volume, turn_manager.tts_pitch)
|
var intro_msg := "You have %s paintings. Sell them fast for at least $%s or face the consequences!" % [paintings_total, target_sales]
|
||||||
DisplayServer.tts_speak("Hit the gavel and input the starting price to begin!", turn_manager.voice_id, turn_manager.tts_volume, turn_manager.tts_pitch)
|
intro_msg += "\nHit the gavel and input the starting price to begin!"
|
||||||
|
turn_manager.speak(intro_msg)
|
||||||
|
|
||||||
next_painting(0)
|
next_painting(0)
|
||||||
#build out the initialization process, which should:
|
#build out the initialization process, which should:
|
||||||
|
|
@ -63,8 +63,6 @@ func _ready() -> void:
|
||||||
# -- have tts announcement of starting bid and start of auction
|
# -- have tts announcement of starting bid and start of auction
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func _handle_gavel_hit():
|
func _handle_gavel_hit():
|
||||||
if state == bidding_state.CLOSED:
|
if state == bidding_state.CLOSED:
|
||||||
state = bidding_state.READY
|
state = bidding_state.READY
|
||||||
|
|
@ -85,15 +83,12 @@ func _handle_gavel_hit():
|
||||||
else:
|
else:
|
||||||
end_auction()
|
end_auction()
|
||||||
|
|
||||||
else:
|
|
||||||
pass
|
|
||||||
|
|
||||||
func destroy_painting():
|
func destroy_painting():
|
||||||
# Painting destruction animation/particle effect
|
# Painting destruction animation/particle effect
|
||||||
$FailedPainting.play()
|
$FailedPainting.play()
|
||||||
current_painting += 1
|
current_painting += 1
|
||||||
DisplayServer.tts_speak("Oh nooooooo! Took too long!", turn_manager.voice_id, turn_manager.tts_volume, turn_manager.tts_pitch)
|
turn_manager.speak("Oh nooooooo! Took too long!\nTry to make it up on the next painting!")
|
||||||
DisplayServer.tts_speak("Try to make it up on the next painting!", turn_manager.voice_id, turn_manager.tts_volume, turn_manager.tts_pitch)
|
|
||||||
desk.numpad.reminder_timer.stop()
|
desk.numpad.reminder_timer.stop()
|
||||||
next_painting(current_painting)
|
next_painting(current_painting)
|
||||||
|
|
||||||
|
|
@ -104,7 +99,6 @@ func next_painting(a: int):
|
||||||
$NextPainting.play()
|
$NextPainting.play()
|
||||||
starting_price = paintings[a]
|
starting_price = paintings[a]
|
||||||
current_bid = 0
|
current_bid = 0
|
||||||
|
|
||||||
# will need to add animation/image swap
|
# will need to add animation/image swap
|
||||||
new_painting_displayed.emit()
|
new_painting_displayed.emit()
|
||||||
|
|
||||||
|
|
@ -115,10 +109,10 @@ func end_auction():
|
||||||
#add in logic for displaying/transitioning to score screen
|
#add in logic for displaying/transitioning to score screen
|
||||||
if total_sales >= target_sales:
|
if total_sales >= target_sales:
|
||||||
#add context specific score text?
|
#add context specific score text?
|
||||||
DisplayServer.tts_speak("Congratulations! The auction house will run another day.", turn_manager.voice_id, turn_manager.tts_volume, turn_manager.tts_pitch)
|
turn_manager.speak("Congratulations! The auction house will run another day.")
|
||||||
else:
|
else:
|
||||||
#add context specific score text?
|
#add context specific score text?
|
||||||
DisplayServer.tts_speak("You have failed. We must find a new auctioneer.", turn_manager.voice_id, turn_manager.tts_volume, turn_manager.tts_pitch)
|
turn_manager.speak("You have failed. We must find a new auctioneer.")
|
||||||
|
|
||||||
# OTHER THINGS TO ADD:
|
# OTHER THINGS TO ADD:
|
||||||
# UI elements for score
|
# UI elements for score
|
||||||
|
|
|
||||||
23
main.tscn
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=24 format=3 uid="uid://dt4nq0nkmjiit"]
|
[gd_scene load_steps=26 format=3 uid="uid://dt4nq0nkmjiit"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b5tcsve1oo5ht" path="res://game_manager.gd" id="1_ig7tw"]
|
[ext_resource type="Script" uid="uid://b5tcsve1oo5ht" path="res://game_manager.gd" id="1_ig7tw"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cvqsf1nlfqwpr" path="res://assets/background/background.png" id="1_lquwl"]
|
[ext_resource type="Texture2D" uid="uid://cvqsf1nlfqwpr" path="res://assets/background/background.png" id="1_lquwl"]
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
[ext_resource type="Texture2D" uid="uid://d2142cf22t1lv" path="res://assets/buttons/button1.png" id="9_2cqfq"]
|
[ext_resource type="Texture2D" uid="uid://d2142cf22t1lv" path="res://assets/buttons/button1.png" id="9_2cqfq"]
|
||||||
[ext_resource type="PackedScene" uid="uid://donkfeu1x888o" path="res://paintings/painting.tscn" id="9_kek77"]
|
[ext_resource type="PackedScene" uid="uid://donkfeu1x888o" path="res://paintings/painting.tscn" id="9_kek77"]
|
||||||
[ext_resource type="Script" uid="uid://bg1vk1o2eq3fg" path="res://bark_buttons.gd" id="9_yaehf"]
|
[ext_resource type="Script" uid="uid://bg1vk1o2eq3fg" path="res://bark_buttons.gd" id="9_yaehf"]
|
||||||
|
[ext_resource type="Script" uid="uid://sfhg7pkumnwa" path="res://captions.gd" id="10_ryguw"]
|
||||||
[ext_resource type="Texture2D" uid="uid://ut655l8y8xmi" path="res://assets/buttons/button1pressed.png" id="10_yaehf"]
|
[ext_resource type="Texture2D" uid="uid://ut655l8y8xmi" path="res://assets/buttons/button1pressed.png" id="10_yaehf"]
|
||||||
[ext_resource type="Texture2D" uid="uid://c0iad21xtnjdd" path="res://assets/buttons/button3.png" id="11_074og"]
|
[ext_resource type="Texture2D" uid="uid://c0iad21xtnjdd" path="res://assets/buttons/button3.png" id="11_074og"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dx4dadmb37khl" path="res://assets/buttons/button3pressed.png" id="12_cegan"]
|
[ext_resource type="Texture2D" uid="uid://dx4dadmb37khl" path="res://assets/buttons/button3pressed.png" id="12_cegan"]
|
||||||
|
|
@ -27,6 +28,11 @@
|
||||||
default_font = ExtResource("2_5vw27")
|
default_font = ExtResource("2_5vw27")
|
||||||
default_font_size = 12
|
default_font_size = 12
|
||||||
|
|
||||||
|
[sub_resource type="LabelSettings" id="LabelSettings_ryguw"]
|
||||||
|
font = ExtResource("2_5vw27")
|
||||||
|
shadow_size = 5
|
||||||
|
shadow_color = Color(0, 0, 0, 0.416)
|
||||||
|
|
||||||
[node name="Main" type="Node"]
|
[node name="Main" type="Node"]
|
||||||
|
|
||||||
[node name="Background" type="Sprite2D" parent="."]
|
[node name="Background" type="Sprite2D" parent="."]
|
||||||
|
|
@ -45,6 +51,7 @@ texture = ExtResource("3_272bh")
|
||||||
|
|
||||||
[node name="Painting" parent="." instance=ExtResource("9_kek77")]
|
[node name="Painting" parent="." instance=ExtResource("9_kek77")]
|
||||||
position = Vector2(1075, 130)
|
position = Vector2(1075, 130)
|
||||||
|
rng_seed = 1262753571
|
||||||
|
|
||||||
[node name="GameManager" type="Node2D" parent="." node_paths=PackedStringArray("audience_manager", "desk", "turn_manager", "current_bid_display")]
|
[node name="GameManager" type="Node2D" parent="." node_paths=PackedStringArray("audience_manager", "desk", "turn_manager", "current_bid_display")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|
@ -85,14 +92,26 @@ text = "Current Bid: $0"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="Captions" type="Label" parent="UI"]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_top = 352.0
|
||||||
|
offset_right = 1280.0
|
||||||
|
offset_bottom = 392.0
|
||||||
|
text = "PLACEHOLDER"
|
||||||
|
label_settings = SubResource("LabelSettings_ryguw")
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
script = ExtResource("10_ryguw")
|
||||||
|
|
||||||
[node name="AudienceManager" parent="." node_paths=PackedStringArray("desk", "game_manager", "bark_buttons") instance=ExtResource("6_272bh")]
|
[node name="AudienceManager" parent="." node_paths=PackedStringArray("desk", "game_manager", "bark_buttons") instance=ExtResource("6_272bh")]
|
||||||
desk = NodePath("../Desk")
|
desk = NodePath("../Desk")
|
||||||
game_manager = NodePath("../GameManager")
|
game_manager = NodePath("../GameManager")
|
||||||
bark_buttons = NodePath("../BarkButtons")
|
bark_buttons = NodePath("../BarkButtons")
|
||||||
|
|
||||||
[node name="TurnManager" parent="." node_paths=PackedStringArray("desk", "game_manager", "audience_manager") instance=ExtResource("7_272bh")]
|
[node name="TurnManager" parent="." node_paths=PackedStringArray("desk", "captions", "game_manager", "audience_manager") instance=ExtResource("7_272bh")]
|
||||||
tts_sentence_speed = 4.5
|
tts_sentence_speed = 4.5
|
||||||
desk = NodePath("../Desk")
|
desk = NodePath("../Desk")
|
||||||
|
captions = NodePath("../UI/Captions")
|
||||||
game_manager = NodePath("../GameManager")
|
game_manager = NodePath("../GameManager")
|
||||||
audience_manager = NodePath("../AudienceManager")
|
audience_manager = NodePath("../AudienceManager")
|
||||||
|
|
||||||
|
|
|
||||||
10
numpad.gd
|
|
@ -16,9 +16,9 @@ var turn_manager: TurnManager
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
progress_bar.max_value = reminder_timer.wait_time
|
progress_bar.max_value = reminder_timer.wait_time
|
||||||
|
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
|
||||||
|
func _process(_delta: float) -> void:
|
||||||
progress_bar.value = reminder_timer.time_left
|
progress_bar.value = reminder_timer.time_left
|
||||||
|
|
||||||
# number entry function called by numbered button children
|
# number entry function called by numbered button children
|
||||||
|
|
@ -32,9 +32,9 @@ func keypad_backspace():
|
||||||
func keypad_submit():
|
func keypad_submit():
|
||||||
var keypad_output: String = "".join(numpad_buffer)
|
var keypad_output: String = "".join(numpad_buffer)
|
||||||
proposed_ask = int(keypad_output) * 1000
|
proposed_ask = int(keypad_output) * 1000
|
||||||
|
|
||||||
if proposed_ask == 0: return
|
if proposed_ask == 0: return
|
||||||
|
|
||||||
match game_manager.state:
|
match game_manager.state:
|
||||||
game_manager.bidding_state.READY:
|
game_manager.bidding_state.READY:
|
||||||
if proposed_ask == game_manager.starting_price:
|
if proposed_ask == game_manager.starting_price:
|
||||||
|
|
@ -64,7 +64,7 @@ func keypad_submit():
|
||||||
error_audio_player.play()
|
error_audio_player.play()
|
||||||
_:
|
_:
|
||||||
error_audio_player.play()
|
error_audio_player.play()
|
||||||
|
|
||||||
# need to avoid starting the reminder timer before
|
# need to avoid starting the reminder timer before
|
||||||
# the auction starts
|
# the auction starts
|
||||||
numpad_buffer.clear()
|
numpad_buffer.clear()
|
||||||
|
|
|
||||||
BIN
paintings/dmg.png
Normal file
|
After Width: | Height: | Size: 7 KiB |
40
paintings/dmg.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://d02jhn3d0pwir"
|
||||||
|
path="res://.godot/imported/dmg.png-847f37e3df3d5bea8849f4f38fa49482.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://paintings/dmg.png"
|
||||||
|
dest_files=["res://.godot/imported/dmg.png-847f37e3df3d5bea8849f4f38fa49482.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
|
||||||
|
|
@ -25,6 +25,7 @@ extends ColorRect
|
||||||
|
|
||||||
@export var rng_seed := 0:
|
@export var rng_seed := 0:
|
||||||
set(x):
|
set(x):
|
||||||
|
if rng_seed == x: return
|
||||||
rng_seed = x
|
rng_seed = x
|
||||||
_regenerate()
|
_regenerate()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,26 @@ extends Node2D
|
||||||
class_name Painting
|
class_name Painting
|
||||||
|
|
||||||
|
|
||||||
@export_tool_button('Randomize', 'RandomNumberGenerator') var randomize_action = randomize
|
@export var painting_id: int:
|
||||||
|
set(x):
|
||||||
|
painting_id = x
|
||||||
|
queue_redraw()
|
||||||
|
|
||||||
|
|
||||||
func randomize(rng_seed := randi()) -> void:
|
@export var overwrite_texture: Texture2D:
|
||||||
%Noise.rng_seed = rng_seed
|
set(x):
|
||||||
|
overwrite_texture = x
|
||||||
|
queue_redraw()
|
||||||
|
|
||||||
|
|
||||||
|
@export_range(0, 3) var damage: int:
|
||||||
|
set(x):
|
||||||
|
damage = clampi(x, 0, 3)
|
||||||
|
queue_redraw()
|
||||||
|
|
||||||
|
|
||||||
|
func _draw() -> void:
|
||||||
|
%Dmg.visible = damage > 0
|
||||||
|
%Dmg.frame = damage - 1 if damage > 0 else 0
|
||||||
|
%Noise.rng_seed = painting_id
|
||||||
|
%TextureRect.texture = overwrite_texture
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,16 @@
|
||||||
[gd_scene load_steps=5 format=3 uid="uid://donkfeu1x888o"]
|
[gd_scene load_steps=6 format=3 uid="uid://donkfeu1x888o"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://b142kv367vbw7" path="res://paintings/frame.png" id="1_6chac"]
|
[ext_resource type="Texture2D" uid="uid://b142kv367vbw7" path="res://paintings/frame.png" id="1_6chac"]
|
||||||
[ext_resource type="Script" uid="uid://tqu2ms43fhis" path="res://paintings/painting.gd" id="1_465no"]
|
[ext_resource type="Script" uid="uid://tqu2ms43fhis" path="res://paintings/painting.gd" id="1_465no"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bjpharjtpysre" path="res://paintings/noise.tscn" id="2_oqt1c"]
|
[ext_resource type="PackedScene" uid="uid://bjpharjtpysre" path="res://paintings/noise.tscn" id="2_oqt1c"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://d02jhn3d0pwir" path="res://paintings/dmg.png" id="4_t4wwa"]
|
||||||
|
|
||||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_465no"]
|
[sub_resource type="FastNoiseLite" id="FastNoiseLite_465no"]
|
||||||
resource_local_to_scene = true
|
resource_local_to_scene = true
|
||||||
seed = 1262753571
|
frequency = 0.002661236
|
||||||
frequency = 0.0024024888
|
|
||||||
offset = Vector3(1460.7504, 943.2602, 0)
|
offset = Vector3(1460.7504, 943.2602, 0)
|
||||||
fractal_type = 0
|
fractal_type = 3
|
||||||
|
fractal_octaves = 2
|
||||||
|
|
||||||
[node name="Painting" type="Node2D"]
|
[node name="Painting" type="Node2D"]
|
||||||
texture_filter = 1
|
texture_filter = 1
|
||||||
|
|
@ -18,22 +19,33 @@ script = ExtResource("1_465no")
|
||||||
[node name="Frame" type="Sprite2D" parent="."]
|
[node name="Frame" type="Sprite2D" parent="."]
|
||||||
texture = ExtResource("1_6chac")
|
texture = ExtResource("1_6chac")
|
||||||
|
|
||||||
[node name="SubViewportContainer" type="SubViewportContainer" parent="."]
|
[node name="Control" type="Control" parent="."]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 0
|
||||||
offset_left = -146.0
|
offset_left = -146.0
|
||||||
offset_top = -91.0
|
offset_top = -91.0
|
||||||
offset_right = 146.0
|
offset_right = 146.0
|
||||||
offset_bottom = 91.0
|
offset_bottom = 91.0
|
||||||
|
|
||||||
|
[node name="SubViewportContainer" type="SubViewportContainer" parent="Control"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
stretch = true
|
stretch = true
|
||||||
stretch_shrink = 4
|
stretch_shrink = 4
|
||||||
|
|
||||||
[node name="SubViewport" type="SubViewport" parent="SubViewportContainer"]
|
[node name="SubViewport" type="SubViewport" parent="Control/SubViewportContainer"]
|
||||||
|
transparent_bg = true
|
||||||
handle_input_locally = false
|
handle_input_locally = false
|
||||||
size = Vector2i(73, 45)
|
size = Vector2i(73, 45)
|
||||||
size_2d_override = Vector2i(480, 360)
|
size_2d_override = Vector2i(480, 360)
|
||||||
size_2d_override_stretch = true
|
size_2d_override_stretch = true
|
||||||
render_target_update_mode = 4
|
render_target_update_mode = 4
|
||||||
|
|
||||||
[node name="Noise" parent="SubViewportContainer/SubViewport" instance=ExtResource("2_oqt1c")]
|
[node name="Noise" parent="Control/SubViewportContainer/SubViewport" instance=ExtResource("2_oqt1c")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
|
|
@ -43,7 +55,22 @@ offset_bottom = 0.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
noise = SubResource("FastNoiseLite_465no")
|
noise = SubResource("FastNoiseLite_465no")
|
||||||
steps = 5
|
steps = 24
|
||||||
gradient_start = Color(0.31606108, 0.20250309, 0.17190823, 1)
|
gradient_start = Color(0.605822, 0.410077, 0.7508662, 1)
|
||||||
gradient_end = Color(0.48729545, 0.5426228, 0.2567169, 1)
|
gradient_end = Color(0.1471889, 0.25502726, 0.39230567, 1)
|
||||||
rng_seed = 1262753571
|
|
||||||
|
[node name="TextureRect" type="TextureRect" parent="Control"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
expand_mode = 1
|
||||||
|
|
||||||
|
[node name="Dmg" type="Sprite2D" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("4_t4wwa")
|
||||||
|
hframes = 3
|
||||||
|
|
|
||||||
54
paintings/painting_display.gd
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
@tool
|
||||||
|
extends Node2D
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@export var shake_distance := 12.0
|
||||||
|
@export var shake_duration := 0.3
|
||||||
|
@export var shake_step_count := 5
|
||||||
|
@export_tool_button('Damage Painting') var damage_painting_action = damage_painting
|
||||||
|
|
||||||
|
|
||||||
|
@export var custom_paintings: Array[Texture2D]
|
||||||
|
@export_tool_button('Next Custom') var next_custom_action = func next_custom():
|
||||||
|
var idx: int = (%Painting.painting_id + 1) % custom_paintings.size()
|
||||||
|
%Painting.overwrite_texture = custom_paintings[idx]
|
||||||
|
%Painting.painting_id = idx
|
||||||
|
|
||||||
|
|
||||||
|
@export_tool_button('Random Procedual') var random_procedual_action = func random_procedual():
|
||||||
|
%Painting.painting_id = randi()
|
||||||
|
%Painting.overwrite_texture = null
|
||||||
|
|
||||||
|
|
||||||
|
func get_n_unique_custom_paintings(count: int) -> Array[int]:
|
||||||
|
var list: Array[int] = []
|
||||||
|
for idx in custom_paintings.size(): list.push_back(idx)
|
||||||
|
list.shuffle()
|
||||||
|
list.resize(count)
|
||||||
|
return list
|
||||||
|
|
||||||
|
|
||||||
|
var _shake_tween: Tween
|
||||||
|
|
||||||
|
func animate_shake():
|
||||||
|
if _shake_tween: _shake_tween.kill()
|
||||||
|
var shake_step := shake_duration / shake_step_count
|
||||||
|
_shake_tween = create_tween()
|
||||||
|
for i in shake_step_count:
|
||||||
|
var pos := Vector2(randf_range(-shake_distance, shake_distance), randf_range(-shake_distance, shake_distance))
|
||||||
|
_shake_tween.set_ease(Tween.EASE_OUT_IN)
|
||||||
|
_shake_tween.set_trans(Tween.TRANS_ELASTIC)
|
||||||
|
_shake_tween.tween_property(%Rela1, ^'position', pos, shake_step)
|
||||||
|
_shake_tween.set_ease(Tween.EASE_OUT)
|
||||||
|
_shake_tween.set_trans(Tween.TRANS_ELASTIC)
|
||||||
|
_shake_tween.tween_property(%Rela1, ^'position', Vector2.ZERO, shake_duration)
|
||||||
|
_shake_tween.tween_callback(func(): _shake_tween = null)
|
||||||
|
|
||||||
|
|
||||||
|
func damage_painting():
|
||||||
|
if %Painting.damage == 3:
|
||||||
|
%Painting.damage = 0
|
||||||
|
else:
|
||||||
|
%Painting.damage += 1
|
||||||
|
animate_shake()
|
||||||
1
paintings/painting_display.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://cy636hseq5fo4
|
||||||
94
paintings/painting_display.tscn
Normal file
|
|
@ -0,0 +1,94 @@
|
||||||
|
[gd_scene load_steps=20 format=3 uid="uid://csugksrssibrp"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://cy636hseq5fo4" path="res://paintings/painting_display.gd" id="1_gy870"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://donkfeu1x888o" path="res://paintings/painting.tscn" id="2_5v8dq"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dj7wj38a447jn" path="res://paintings/veryart/1/F0.png" id="2_7o3cd"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://drlta7bv52utw" path="res://paintings/veryart/2/F0.png" id="3_t05i8"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://crih6jm2ms4kt" path="res://paintings/veryart/3/F0.png" id="4_k2el0"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://byvh75dt6j3tv" path="res://paintings/veryart/4/F0.png" id="5_238kw"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dchq2odvlum6i" path="res://paintings/veryart/5/F0.png" id="6_ugvm4"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://b0588wdutp328" path="res://paintings/veryart/6/F0.png" id="7_aqt5w"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cse035uvcnob5" path="res://paintings/veryart/7/F0.png" id="8_dng8e"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cco31jtejtaex" path="res://paintings/veryart/8/F0.png" id="9_mtyqy"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://b57h2svvximny" path="res://paintings/veryart/9/F0.png" id="10_ybjp4"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://b7dbha8x4c0tj" path="res://paintings/veryart/10/F0.png" id="11_q2yjp"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bb6aiffvsc8mr" path="res://paintings/veryart/11/F0.png" id="12_r4wn3"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://b5tlr6nxy8vft" path="res://paintings/veryart/12.png" id="13_v614m"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dps241gwu1flx" path="res://paintings/veryart/notart.png" id="14_5sb26"]
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_a2c10"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("Root1/Rela1:rotation")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_5v8dq"]
|
||||||
|
resource_name = "shake"
|
||||||
|
tracks/0/type = "method"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath(".")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"values": [{
|
||||||
|
"args": [],
|
||||||
|
"method": &"animate_shake"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_7o3cd"]
|
||||||
|
resource_name = "broke"
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("Root1/Rela1:rotation")
|
||||||
|
tracks/0/interp = 2
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.3),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0, 0.2617993877991494]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_a2c10"]
|
||||||
|
_data = {
|
||||||
|
&"RESET": SubResource("Animation_a2c10"),
|
||||||
|
&"broke": SubResource("Animation_7o3cd"),
|
||||||
|
&"shake": SubResource("Animation_5v8dq")
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="PaintingDisplay" type="Node2D"]
|
||||||
|
script = ExtResource("1_gy870")
|
||||||
|
custom_paintings = Array[Texture2D]([ExtResource("2_7o3cd"), ExtResource("3_t05i8"), ExtResource("4_k2el0"), ExtResource("5_238kw"), ExtResource("6_ugvm4"), ExtResource("7_aqt5w"), ExtResource("8_dng8e"), ExtResource("9_mtyqy"), ExtResource("10_ybjp4"), ExtResource("11_q2yjp"), ExtResource("12_r4wn3"), ExtResource("13_v614m"), ExtResource("14_5sb26")])
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
|
libraries = {
|
||||||
|
&"": SubResource("AnimationLibrary_a2c10")
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Root1" type="Node2D" parent="."]
|
||||||
|
|
||||||
|
[node name="Rela1" type="Node2D" parent="Root1"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
|
||||||
|
[node name="Painting" parent="Root1/Rela1" instance=ExtResource("2_5v8dq")]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
painting_id = 6
|
||||||
|
overwrite_texture = ExtResource("8_dng8e")
|
||||||
|
|
||||||
|
[node name="Root2" type="Node2D" parent="."]
|
||||||
|
|
||||||
|
[node name="Rela2" type="Node2D" parent="Root2"]
|
||||||
BIN
paintings/veryart/1/F0.png
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
40
paintings/veryart/1/F0.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dj7wj38a447jn"
|
||||||
|
path="res://.godot/imported/F0.png-3f6b68480ef4c52f836001c865a6fecc.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://paintings/veryart/1/F0.png"
|
||||||
|
dest_files=["res://.godot/imported/F0.png-3f6b68480ef4c52f836001c865a6fecc.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
|
||||||
BIN
paintings/veryart/10/F0.png
Normal file
|
After Width: | Height: | Size: 8 KiB |
40
paintings/veryart/10/F0.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://b7dbha8x4c0tj"
|
||||||
|
path="res://.godot/imported/F0.png-33e844b1a0c64e2887780dc13544887c.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://paintings/veryart/10/F0.png"
|
||||||
|
dest_files=["res://.godot/imported/F0.png-33e844b1a0c64e2887780dc13544887c.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
|
||||||
BIN
paintings/veryart/11/F0.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
40
paintings/veryart/11/F0.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bb6aiffvsc8mr"
|
||||||
|
path="res://.godot/imported/F0.png-1444aa60a3e120bd4da66237f3749f52.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://paintings/veryart/11/F0.png"
|
||||||
|
dest_files=["res://.godot/imported/F0.png-1444aa60a3e120bd4da66237f3749f52.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
|
||||||
BIN
paintings/veryart/12.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
40
paintings/veryart/12.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://b5tlr6nxy8vft"
|
||||||
|
path="res://.godot/imported/12.png-e8e67405f3c930c2885b1f046715bb7f.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://paintings/veryart/12.png"
|
||||||
|
dest_files=["res://.godot/imported/12.png-e8e67405f3c930c2885b1f046715bb7f.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
|
||||||
BIN
paintings/veryart/2/F0.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
40
paintings/veryart/2/F0.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://drlta7bv52utw"
|
||||||
|
path="res://.godot/imported/F0.png-2c22cf6ea53abfe36632fbfdce7746c1.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://paintings/veryart/2/F0.png"
|
||||||
|
dest_files=["res://.godot/imported/F0.png-2c22cf6ea53abfe36632fbfdce7746c1.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
|
||||||
BIN
paintings/veryart/3/F0.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
40
paintings/veryart/3/F0.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://crih6jm2ms4kt"
|
||||||
|
path="res://.godot/imported/F0.png-165d06b886172fca9ebd15c1adbb6fe0.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://paintings/veryart/3/F0.png"
|
||||||
|
dest_files=["res://.godot/imported/F0.png-165d06b886172fca9ebd15c1adbb6fe0.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
|
||||||
BIN
paintings/veryart/4/F0.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
40
paintings/veryart/4/F0.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://byvh75dt6j3tv"
|
||||||
|
path="res://.godot/imported/F0.png-4d834c40ee4090c4a5342f52ebdbd563.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://paintings/veryart/4/F0.png"
|
||||||
|
dest_files=["res://.godot/imported/F0.png-4d834c40ee4090c4a5342f52ebdbd563.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
|
||||||
BIN
paintings/veryart/5/F0.png
Normal file
|
After Width: | Height: | Size: 7 KiB |
40
paintings/veryart/5/F0.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dchq2odvlum6i"
|
||||||
|
path="res://.godot/imported/F0.png-7036c0b280684bb45b138d78df2a7e8b.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://paintings/veryart/5/F0.png"
|
||||||
|
dest_files=["res://.godot/imported/F0.png-7036c0b280684bb45b138d78df2a7e8b.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
|
||||||
BIN
paintings/veryart/6/F0.png
Normal file
|
After Width: | Height: | Size: 9.9 KiB |
40
paintings/veryart/6/F0.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://b0588wdutp328"
|
||||||
|
path="res://.godot/imported/F0.png-c522a6fdeb6ce1758fa70550a9c7825a.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://paintings/veryart/6/F0.png"
|
||||||
|
dest_files=["res://.godot/imported/F0.png-c522a6fdeb6ce1758fa70550a9c7825a.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
|
||||||
BIN
paintings/veryart/7/F0.png
Normal file
|
After Width: | Height: | Size: 8 KiB |
40
paintings/veryart/7/F0.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cse035uvcnob5"
|
||||||
|
path="res://.godot/imported/F0.png-a1113c585a4e342a285f57f8bb47ede6.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://paintings/veryart/7/F0.png"
|
||||||
|
dest_files=["res://.godot/imported/F0.png-a1113c585a4e342a285f57f8bb47ede6.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
|
||||||
BIN
paintings/veryart/8/F0.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
40
paintings/veryart/8/F0.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cco31jtejtaex"
|
||||||
|
path="res://.godot/imported/F0.png-5bd7ff51a5d1990f6c2fc33af7cbe5f3.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://paintings/veryart/8/F0.png"
|
||||||
|
dest_files=["res://.godot/imported/F0.png-5bd7ff51a5d1990f6c2fc33af7cbe5f3.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
|
||||||
BIN
paintings/veryart/9/F0.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
40
paintings/veryart/9/F0.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://b57h2svvximny"
|
||||||
|
path="res://.godot/imported/F0.png-562f4f5cc0d48f32d431eb2434176ea6.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://paintings/veryart/9/F0.png"
|
||||||
|
dest_files=["res://.godot/imported/F0.png-562f4f5cc0d48f32d431eb2434176ea6.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
|
||||||
BIN
paintings/veryart/notart.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
40
paintings/veryart/notart.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dps241gwu1flx"
|
||||||
|
path="res://.godot/imported/notart.png-28a9d556b2a938d9ca01861b2729395c.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://paintings/veryart/notart.png"
|
||||||
|
dest_files=["res://.godot/imported/notart.png-28a9d556b2a938d9ca01861b2729395c.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
|
||||||
|
|
@ -7,12 +7,14 @@ class_name TurnManager extends Node2D
|
||||||
@export var tts_pitch = 1.0
|
@export var tts_pitch = 1.0
|
||||||
|
|
||||||
@export var desk: Desk
|
@export var desk: Desk
|
||||||
|
@export var captions: CaptionLabel
|
||||||
var timer: Timer
|
var timer: Timer
|
||||||
@export var game_manager: GameManager
|
@export var game_manager: GameManager
|
||||||
@export var audience_manager: AudienceManager
|
@export var audience_manager: AudienceManager
|
||||||
|
|
||||||
var voices = DisplayServer.tts_get_voices_for_language("en")
|
|
||||||
var voice_id = voices[0]
|
var _voices := DisplayServer.tts_get_voices_for_language("en")
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
audience_manager.ask_accepted.connect(_handle_ask_accepted)
|
audience_manager.ask_accepted.connect(_handle_ask_accepted)
|
||||||
|
|
@ -20,20 +22,29 @@ func _ready() -> void:
|
||||||
timer = desk.numpad.reminder_timer
|
timer = desk.numpad.reminder_timer
|
||||||
timer.wait_time = turn_timer
|
timer.wait_time = turn_timer
|
||||||
desk.numpad.reminder_timer.timeout.connect(_handle_reminder_timer_timeout)
|
desk.numpad.reminder_timer.timeout.connect(_handle_reminder_timer_timeout)
|
||||||
|
print('voices available: ', _voices.size())
|
||||||
|
|
||||||
|
|
||||||
func turn_timer_animation():
|
func turn_timer_animation():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
func speak(text: String) -> void:
|
||||||
|
print('tts: ', text)
|
||||||
|
captions.display_caption(text)
|
||||||
|
if not _voices.is_empty():
|
||||||
|
DisplayServer.tts_speak(text, _voices[0], tts_volume, tts_pitch, tts_number_speed)
|
||||||
|
|
||||||
|
|
||||||
func _speak_ask_proposed(amount):
|
func _speak_ask_proposed(amount):
|
||||||
var speech_variance = randf()
|
var speech_variance = randf()
|
||||||
if speech_variance < 0.45:
|
if speech_variance < 0.45:
|
||||||
DisplayServer.tts_speak(str(amount), voice_id, tts_volume, tts_pitch, tts_number_speed)
|
speak('%s' % [amount])
|
||||||
elif speech_variance > 0.45 and speech_variance < 0.65:
|
elif speech_variance > 0.45 and speech_variance < 0.65:
|
||||||
DisplayServer.tts_speak("Do I hear" + str(amount), voice_id, tts_volume, tts_pitch, tts_sentence_speed)
|
speak('Do I hear %s?' % [amount])
|
||||||
elif speech_variance > 0.65 and speech_variance < 0.8:
|
elif speech_variance > 0.65 and speech_variance < 0.8:
|
||||||
DisplayServer.tts_speak(str(amount) + ", anybody?", voice_id, tts_volume, tts_pitch, tts_sentence_speed)
|
speak('%s, anybody?' % [amount])
|
||||||
else:
|
else:
|
||||||
DisplayServer.tts_speak("Can I get a" + str(amount), voice_id, tts_volume, tts_pitch, tts_sentence_speed)
|
speak('Can I get a %s?' % [amount])
|
||||||
|
|
||||||
func _handle_ask_accepted():
|
func _handle_ask_accepted():
|
||||||
timer.start()
|
timer.start()
|
||||||
|
|
@ -43,4 +54,3 @@ func _handle_reminder_timer_timeout() -> void:
|
||||||
if game_manager.state == game_manager.bidding_state.ASKING or game_manager.state == game_manager.bidding_state.BID:
|
if game_manager.state == game_manager.bidding_state.ASKING or game_manager.state == game_manager.bidding_state.BID:
|
||||||
game_manager.state = game_manager.bidding_state.CLOSED
|
game_manager.state = game_manager.bidding_state.CLOSED
|
||||||
game_manager.destroy_painting()
|
game_manager.destroy_painting()
|
||||||
|
|
||||||
|
|
|
||||||