Merge remote-tracking branch 'origin/main' into art
This commit is contained in:
commit
bef92f242d
|
@ -15,3 +15,5 @@ settings_volume_sound,Sound Volume,Sound Lautstärke
|
|||
settings_language,Game Language,Spielsprache
|
||||
game_paused,Game paused,Spiel pausiert
|
||||
resume_game,Resume game,Weiterspielen
|
||||
game_over,That's a wrap!,Das war's!
|
||||
your_score,Your score:,Deine Punkte:
|
|
Binary file not shown.
Binary file not shown.
|
@ -18,6 +18,7 @@ config/icon="res://icon.svg"
|
|||
[autoload]
|
||||
|
||||
UserSettings="*res://settings/user_settings.gd"
|
||||
Signals="*res://scenes/signals.gd"
|
||||
|
||||
[display]
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
## Script that manages saving games.
|
||||
class_name SaveGame extends Node
|
||||
|
||||
const ENABLED = true
|
||||
const ENABLED = false
|
||||
const ENCRYPTION_KEY = "godotrules"
|
||||
const SAVE_GAME_TEMPLATE = "savegame.save"
|
||||
const SAVE_GROUP_NAME = "Persist"
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
extends Label
|
||||
|
||||
@onready var crowd_controller: Crowd = get_node("/root/IngameScene/Crowd")
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(_delta):
|
||||
text = str(int(crowd_controller.overall_mood))
|
|
@ -0,0 +1,7 @@
|
|||
extends Label
|
||||
|
||||
@onready var Tim : Comedian = get_node("../../Tim")
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
text = str(int(max(0, Tim.stamina)))
|
|
@ -5,27 +5,37 @@ signal button_pressed(joke)
|
|||
@export_enum("joke_button_1", "joke_button_2", "joke_button_3") var action: String
|
||||
@export var sprite: Sprite2D
|
||||
|
||||
@export var stamina_categories: Array[int]
|
||||
@export var type_sprites: Array[Texture2D]
|
||||
|
||||
var stamina_label: RichTextLabel
|
||||
|
||||
var current_joke: Joke
|
||||
|
||||
func _map_action_to_joke():
|
||||
func _map_action_to_joke_type():
|
||||
match action:
|
||||
"joke_button_1":
|
||||
return Joke.new(Joke.JokeType.Joke1)
|
||||
return Joke.JokeType.Joke1
|
||||
"joke_button_2":
|
||||
return Joke.new(Joke.JokeType.Joke2)
|
||||
return Joke.JokeType.Joke2
|
||||
"joke_button_3":
|
||||
return Joke.new(Joke.JokeType.Joke3)
|
||||
return Joke.JokeType.Joke3
|
||||
|
||||
func _get_joke(type):
|
||||
return Joke.new(type, stamina_categories[randi_range(0, stamina_categories.size() - 1)])
|
||||
|
||||
func _ready():
|
||||
set_current_joke(_map_action_to_joke())
|
||||
stamina_label = find_child("StaminaLabel")
|
||||
set_current_joke(_get_joke(_map_action_to_joke_type()))
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed(action):
|
||||
button_pressed.emit(current_joke)
|
||||
set_current_joke(_get_joke(_map_action_to_joke_type()))
|
||||
|
||||
func set_current_joke(joke: Joke):
|
||||
current_joke = joke
|
||||
sprite.texture = type_sprites[joke.type]
|
||||
stamina_label.text = "%s" % joke.required_stamina
|
||||
print("stamina: ", joke.required_stamina)
|
||||
|
|
|
@ -1,13 +1,20 @@
|
|||
class_name Comedian
|
||||
extends Node2D
|
||||
|
||||
@export var move_speed = 100
|
||||
@export var boundary: Boundary
|
||||
@export var tim_sprite: Sprite2D
|
||||
@export var transmitter_area: Area2D
|
||||
@export var stamina: int = 100
|
||||
|
||||
var default_texture: Texture2D = load("res://sprites/tim_side.png")
|
||||
var ducking_texture: Texture2D = load("res://sprites/tim_ducking.svg")
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
Signals.hit_tim.connect(ouch)
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
|
@ -24,10 +31,39 @@ func _process(delta):
|
|||
global_position = Vector2(boundary.get_most_left_position(), global_position.y)
|
||||
|
||||
|
||||
func _on_joke_button_button_pressed(joke):
|
||||
func _on_joke_button_button_pressed(joke: Joke):
|
||||
$AnimationPlayer.play("talking")
|
||||
stamina -= joke.required_stamina
|
||||
|
||||
for body in transmitter_area.get_overlapping_bodies():
|
||||
var person = body.find_parent("Person")
|
||||
if not (person is AudienceMember):
|
||||
continue
|
||||
|
||||
person.on_joke(joke)
|
||||
|
||||
if stamina <= 0:
|
||||
_on_stamina_empty()
|
||||
|
||||
|
||||
func _on_stamina_empty():
|
||||
get_node("../DisplayGUI").visible = false
|
||||
|
||||
var fade = get_node("/root/IngameScene/UI/FadeOverlay")
|
||||
fade.modulate.a = fade.minimum_opacity
|
||||
fade.visible = true
|
||||
|
||||
get_viewport().set_input_as_handled()
|
||||
get_tree().paused = true
|
||||
|
||||
var score_overlay = get_node("/root/IngameScene/UI/ScoreOverlay")
|
||||
score_overlay.get_node("VBoxContainer3/FinalScore").text = str(int(get_node("/root/IngameScene/Crowd").overall_mood))
|
||||
score_overlay.grab_button_focus()
|
||||
score_overlay.visible = true
|
||||
pass
|
||||
|
||||
|
||||
func ouch():
|
||||
$Sprite2D.texture = ducking_texture
|
||||
await get_tree().create_timer(1).timeout
|
||||
$Sprite2D.texture = default_texture
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
class_name AudienceProfile
|
||||
extends Node2D
|
||||
|
||||
|
||||
class ProfileData:
|
||||
var happy_threshold: float
|
||||
var angry_threshold: float
|
||||
|
@ -9,7 +10,14 @@ class ProfileData:
|
|||
var lashout_decay: float
|
||||
var joke_mood_mapping: Dictionary
|
||||
|
||||
func _init(happy_threshold, angry_threshold, lashout_threshold, happiness_decay, lashout_decay, joke_mood_mapping):
|
||||
func _init(
|
||||
happy_threshold,
|
||||
angry_threshold,
|
||||
lashout_threshold,
|
||||
happiness_decay,
|
||||
lashout_decay,
|
||||
joke_mood_mapping
|
||||
):
|
||||
self.happy_threshold = happy_threshold
|
||||
self.angry_threshold = angry_threshold
|
||||
self.lashout_threshold = lashout_threshold
|
||||
|
@ -17,6 +25,7 @@ class ProfileData:
|
|||
self.lashout_decay = lashout_decay
|
||||
self.joke_mood_mapping = joke_mood_mapping
|
||||
|
||||
|
||||
var happy_threshold: float
|
||||
var angry_threshold: float
|
||||
var lashout_threshold: float
|
||||
|
@ -27,6 +36,7 @@ var lashout_decay : float
|
|||
# Maps JokeType (as int) to mood change (as float)
|
||||
var joke_mood_mapping: Dictionary
|
||||
|
||||
|
||||
static func get_profile_data(index) -> ProfileData:
|
||||
var profiles = [
|
||||
ProfileData.new(3, -3, -10, 0.1, 0.1, {0: 1, 1: -0.25, 2: 0}),
|
||||
|
@ -35,14 +45,17 @@ static func get_profile_data(index) -> ProfileData:
|
|||
]
|
||||
return profiles[index]
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(_delta):
|
||||
pass
|
||||
|
||||
|
||||
func load_data(data: ProfileData):
|
||||
happy_threshold = data.happy_threshold
|
||||
angry_threshold = data.angry_threshold
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
class_name Crowd
|
||||
extends Node2D
|
||||
|
||||
@export_range(1, 16, 1)
|
||||
var max_persons = 16
|
||||
@export_range(1, 16, 1) var max_persons = 16
|
||||
|
||||
|
||||
var audience : Array[AudienceMember] = []
|
||||
var overall_mood : float = 0
|
||||
|
||||
func _ready():
|
||||
var counter = 0
|
||||
|
@ -10,7 +14,14 @@ func _ready():
|
|||
var person_node = person.instantiate()
|
||||
person_node.color = AudienceMember.get_random_color()
|
||||
seat.add_child(person_node)
|
||||
audience.append(person_node)
|
||||
|
||||
counter += 1
|
||||
if counter == max_persons:
|
||||
break
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(_delta):
|
||||
overall_mood = 0
|
||||
for m in audience:
|
||||
overall_mood += m.mood
|
||||
|
|
|
@ -8,126 +8,126 @@
|
|||
position = Vector2(240, 232)
|
||||
script = ExtResource("1_y7wyj")
|
||||
|
||||
[node name="Tables" type="Node" parent="."]
|
||||
[node name="Tables" type="Node2D" parent="."]
|
||||
|
||||
[node name="Table_1" type="Sprite2D" parent="Tables"]
|
||||
z_index = 35
|
||||
position = Vector2(170, 199)
|
||||
position = Vector2(-70, -33)
|
||||
scale = Vector2(0.25, 0.25)
|
||||
texture = ExtResource("2_bax5s")
|
||||
|
||||
[node name="Table_2" type="Sprite2D" parent="Tables"]
|
||||
z_index = 25
|
||||
position = Vector2(359, 138)
|
||||
position = Vector2(119, -94)
|
||||
scale = Vector2(0.25, 0.25)
|
||||
texture = ExtResource("2_bax5s")
|
||||
|
||||
[node name="Table_3" type="Sprite2D" parent="Tables"]
|
||||
z_index = 15
|
||||
position = Vector2(203, 84)
|
||||
position = Vector2(-37, -148)
|
||||
scale = Vector2(0.25, 0.25)
|
||||
texture = ExtResource("2_bax5s")
|
||||
|
||||
[node name="Table_4" type="Sprite2D" parent="Tables"]
|
||||
z_index = 45
|
||||
position = Vector2(319, 230)
|
||||
position = Vector2(79, -2)
|
||||
scale = Vector2(0.25, 0.25)
|
||||
texture = ExtResource("2_bax5s")
|
||||
|
||||
[node name="Seats" type="Node" parent="."]
|
||||
[node name="Seats" type="Node2D" parent="."]
|
||||
|
||||
[node name="Seat_5" type="Node2D" parent="Seats"]
|
||||
z_index = 10
|
||||
position = Vector2(205, 35)
|
||||
position = Vector2(-35, -197)
|
||||
|
||||
[node name="Chair" parent="Seats/Seat_5" instance=ExtResource("3_y4hpm")]
|
||||
|
||||
[node name="Seat_6" type="Node2D" parent="Seats"]
|
||||
z_index = 12
|
||||
position = Vector2(159, 79)
|
||||
position = Vector2(-81, -153)
|
||||
|
||||
[node name="Chair" parent="Seats/Seat_6" instance=ExtResource("3_y4hpm")]
|
||||
|
||||
[node name="Seat_7" type="Node2D" parent="Seats"]
|
||||
z_index = 13
|
||||
position = Vector2(249, 81)
|
||||
position = Vector2(9, -151)
|
||||
|
||||
[node name="Chair" parent="Seats/Seat_7" instance=ExtResource("3_y4hpm")]
|
||||
|
||||
[node name="Seat_8" type="Node2D" parent="Seats"]
|
||||
z_index = 17
|
||||
position = Vector2(204, 130)
|
||||
position = Vector2(-36, -102)
|
||||
|
||||
[node name="Chair" parent="Seats/Seat_8" instance=ExtResource("3_y4hpm")]
|
||||
|
||||
[node name="Seat_9" type="Node2D" parent="Seats"]
|
||||
z_index = 20
|
||||
position = Vector2(359, 94)
|
||||
position = Vector2(119, -138)
|
||||
|
||||
[node name="Chair" parent="Seats/Seat_9" instance=ExtResource("3_y4hpm")]
|
||||
|
||||
[node name="Seat_10" type="Node2D" parent="Seats"]
|
||||
z_index = 22
|
||||
position = Vector2(311, 137)
|
||||
position = Vector2(71, -95)
|
||||
|
||||
[node name="Chair" parent="Seats/Seat_10" instance=ExtResource("3_y4hpm")]
|
||||
|
||||
[node name="Seat_11" type="Node2D" parent="Seats"]
|
||||
z_index = 23
|
||||
position = Vector2(401, 133)
|
||||
position = Vector2(161, -99)
|
||||
|
||||
[node name="Chair" parent="Seats/Seat_11" instance=ExtResource("3_y4hpm")]
|
||||
|
||||
[node name="Seat_12" type="Node2D" parent="Seats"]
|
||||
z_index = 26
|
||||
position = Vector2(359, 184)
|
||||
position = Vector2(119, -48)
|
||||
|
||||
[node name="Chair" parent="Seats/Seat_12" instance=ExtResource("3_y4hpm")]
|
||||
|
||||
[node name="Seat_1" type="Node2D" parent="Seats"]
|
||||
z_index = 30
|
||||
position = Vector2(168, 156)
|
||||
position = Vector2(-72, -76)
|
||||
|
||||
[node name="Chair" parent="Seats/Seat_1" instance=ExtResource("3_y4hpm")]
|
||||
|
||||
[node name="Seat_2" type="Node2D" parent="Seats"]
|
||||
z_index = 32
|
||||
position = Vector2(122, 197)
|
||||
position = Vector2(-118, -35)
|
||||
|
||||
[node name="Chair" parent="Seats/Seat_2" instance=ExtResource("3_y4hpm")]
|
||||
|
||||
[node name="Seat_3" type="Node2D" parent="Seats"]
|
||||
z_index = 33
|
||||
position = Vector2(217, 199)
|
||||
position = Vector2(-23, -33)
|
||||
|
||||
[node name="Chair" parent="Seats/Seat_3" instance=ExtResource("3_y4hpm")]
|
||||
|
||||
[node name="Seat_4" type="Node2D" parent="Seats"]
|
||||
z_index = 36
|
||||
position = Vector2(166, 244)
|
||||
position = Vector2(-74, 12)
|
||||
|
||||
[node name="Chair" parent="Seats/Seat_4" instance=ExtResource("3_y4hpm")]
|
||||
|
||||
[node name="Seat_13" type="Node2D" parent="Seats"]
|
||||
z_index = 40
|
||||
position = Vector2(315, 187)
|
||||
position = Vector2(75, -45)
|
||||
|
||||
[node name="Chair" parent="Seats/Seat_13" instance=ExtResource("3_y4hpm")]
|
||||
|
||||
[node name="Seat_14" type="Node2D" parent="Seats"]
|
||||
z_index = 42
|
||||
position = Vector2(276, 232)
|
||||
position = Vector2(36, 0)
|
||||
|
||||
[node name="Chair" parent="Seats/Seat_14" instance=ExtResource("3_y4hpm")]
|
||||
|
||||
[node name="Seat_15" type="Node2D" parent="Seats"]
|
||||
z_index = 43
|
||||
position = Vector2(366, 231)
|
||||
position = Vector2(126, -1)
|
||||
|
||||
[node name="Chair" parent="Seats/Seat_15" instance=ExtResource("3_y4hpm")]
|
||||
|
||||
[node name="Seat_16" type="Node2D" parent="Seats"]
|
||||
z_index = 46
|
||||
position = Vector2(320, 274)
|
||||
position = Vector2(80, 42)
|
||||
|
||||
[node name="Chair" parent="Seats/Seat_16" instance=ExtResource("3_y4hpm")]
|
||||
|
|
|
@ -3,6 +3,7 @@ extends Node2D
|
|||
@onready var fade_overlay = %FadeOverlay
|
||||
@onready var pause_overlay = %PauseOverlay
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
fade_overlay.visible = true
|
||||
|
||||
|
@ -11,6 +12,7 @@ func _ready() -> void:
|
|||
|
||||
pause_overlay.game_exited.connect(_save_game)
|
||||
|
||||
|
||||
func _input(event) -> void:
|
||||
if event.is_action_pressed("pause") and not pause_overlay.visible:
|
||||
get_viewport().set_input_as_handled()
|
||||
|
@ -18,5 +20,6 @@ func _input(event) -> void:
|
|||
pause_overlay.grab_button_focus()
|
||||
pause_overlay.visible = true
|
||||
|
||||
|
||||
func _save_game() -> void:
|
||||
SaveGame.save_game(get_tree())
|
||||
|
|
|
@ -1,28 +1,33 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://cik30de5gaaah"]
|
||||
[gd_scene load_steps=7 format=3 uid="uid://cik30de5gaaah"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/ingame_scene.gd" id="1_objyc"]
|
||||
[ext_resource type="PackedScene" uid="uid://bkk87o2ooo6at" path="res://ui/overlays/fade_overlay.tscn" id="1_y6ebv"]
|
||||
[ext_resource type="PackedScene" uid="uid://jyv4g54adkmo" path="res://ui/overlays/pause_overlay.tscn" id="3_8o178"]
|
||||
[ext_resource type="PackedScene" uid="uid://b0xc4jjyahlvk" path="res://scenes/score_overlay.tscn" id="3_yvlw3"]
|
||||
[ext_resource type="PackedScene" uid="uid://bx6htkgx23t8v" path="res://scenes/crowd/crowd.tscn" id="4_aeh13"]
|
||||
[ext_resource type="PackedScene" uid="uid://cicyfp5xjvvu4" path="res://scenes/stage.tscn" id="5_borcq"]
|
||||
|
||||
[node name="IngameScene" type="Node2D"]
|
||||
script = ExtResource("1_objyc")
|
||||
|
||||
[node name="Crowd" parent="." instance=ExtResource("4_aeh13")]
|
||||
position = Vector2(261, 230)
|
||||
|
||||
[node name="Stage" parent="." instance=ExtResource("5_borcq")]
|
||||
z_index = 10
|
||||
position = Vector2(291, 346)
|
||||
|
||||
[node name="UI" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="FadeOverlay" parent="UI" instance=ExtResource("1_y6ebv")]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
|
||||
[node name="ScoreOverlay" parent="UI" instance=ExtResource("3_yvlw3")]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
|
||||
[node name="PauseOverlay" parent="UI" instance=ExtResource("3_8o178")]
|
||||
unique_name_in_owner = true
|
||||
process_mode = 2
|
||||
visible = false
|
||||
|
||||
[node name="Crowd" parent="." instance=ExtResource("4_aeh13")]
|
||||
position = Vector2(0, 0)
|
||||
|
||||
[node name="Stage" parent="." instance=ExtResource("5_borcq")]
|
||||
z_index = 10
|
||||
position = Vector2(291, 346)
|
||||
|
|
|
@ -9,7 +9,13 @@
|
|||
script = ExtResource("1_lofpb")
|
||||
action = "joke_button_1"
|
||||
sprite = NodePath("Sprite2D")
|
||||
stamina_categories = Array[int]([1, 5, 10])
|
||||
type_sprites = Array[Texture2D]([ExtResource("3_26ki8"), ExtResource("2_ivsb5"), ExtResource("4_o1r21")])
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("2_ivsb5")
|
||||
|
||||
[node name="StaminaLabel" type="RichTextLabel" parent="."]
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
text = "xx"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
extends Sprite2D
|
||||
|
||||
signal hit_tim
|
||||
|
||||
@export var bottle_speed: float = 120;
|
||||
|
||||
var tim_global_position: Vector2
|
||||
|
@ -29,4 +31,5 @@ func _on_growth_timer_timeout():
|
|||
func remove_bottle():
|
||||
if is_hidding:
|
||||
print("Ouch")
|
||||
Signals.hit_tim.emit()
|
||||
queue_free()
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
extends CenterContainer
|
||||
|
||||
signal game_exited
|
||||
|
||||
@onready var new_game_button := %NewGameButton
|
||||
@onready var exit_button := %ExitButton
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
new_game_button.pressed.connect(_new_game)
|
||||
exit_button.pressed.connect(_exit)
|
||||
|
||||
func grab_button_focus() -> void:
|
||||
new_game_button.grab_focus()
|
||||
|
||||
func _new_game() -> void:
|
||||
get_tree().paused = false
|
||||
get_tree().change_scene_to_file("res://scenes/ingame_scene.tscn")
|
||||
|
||||
func _exit() -> void:
|
||||
game_exited.emit()
|
||||
get_tree().quit()
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://b0xc4jjyahlvk"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/score_overlay.gd" id="1_8s0ln"]
|
||||
|
||||
[node name="ScoreOverlay" type="CenterContainer"]
|
||||
process_mode = 2
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_8s0ln")
|
||||
|
||||
[node name="VBoxContainer3" type="VBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer3"]
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"HeaderLarge"
|
||||
text = "game_over"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="LabelScore" type="Label" parent="VBoxContainer3"]
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"HeaderLarge"
|
||||
text = "your_score"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="FinalScore" type="Label" parent="VBoxContainer3"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"HeaderLarge"
|
||||
text = "0"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="MenuContainer" type="VBoxContainer" parent="VBoxContainer3"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="NewGameButton" type="Button" parent="VBoxContainer3/MenuContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(180, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
text = "new_game"
|
||||
|
||||
[node name="ExitButton" type="Button" parent="VBoxContainer3/MenuContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "leave_game"
|
|
@ -0,0 +1,3 @@
|
|||
extends Node
|
||||
|
||||
signal hit_tim
|
|
@ -1,10 +1,15 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://cicyfp5xjvvu4"]
|
||||
[gd_scene load_steps=18 format=3 uid="uid://cicyfp5xjvvu4"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bg85if5rrrdmm" path="res://sprites/room/buehne.svg" id="1_32lst"]
|
||||
[ext_resource type="Script" path="res://scenes/Tim.gd" id="1_g3k2b"]
|
||||
[ext_resource type="Texture2D" uid="uid://kq63ictuirhc" path="res://sprites/tim_side.png" id="1_saxit"]
|
||||
[ext_resource type="Script" path="res://scenes/Boundary.gd" id="2_8p6ir"]
|
||||
[ext_resource type="PackedScene" uid="uid://r1i7ln2hpwq5" path="res://scenes/joke_button.tscn" id="3_0t41i"]
|
||||
[ext_resource type="Texture2D" uid="uid://b8tb4o75kjffn" path="res://sprites/tim_talk.svg" id="3_e1fvx"]
|
||||
[ext_resource type="Script" path="res://scenes/DisplayStamina.gd" id="6_88orn"]
|
||||
[ext_resource type="FontFile" uid="uid://le2vdo2626vw" path="res://fonts/Montserrat-Medium.ttf" id="6_pb3a7"]
|
||||
[ext_resource type="Texture2D" uid="uid://d2264dy2o4q6d" path="res://sprites/tim_side.svg" id="6_qpa7m"]
|
||||
[ext_resource type="Script" path="res://scenes/DisplayMood.gd" id="7_5m0td"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_jfw8v"]
|
||||
radius = 23.0217
|
||||
|
@ -12,6 +17,63 @@ radius = 23.0217
|
|||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_wmfel"]
|
||||
size = Vector2(250, 10000)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_n0bwh"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:texture")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [ExtResource("3_e1fvx")]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_5tnw3"]
|
||||
resource_name = "idle"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:texture")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 1,
|
||||
"values": [ExtResource("6_qpa7m"), ExtResource("6_qpa7m")]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_kkrfv"]
|
||||
resource_name = "talking"
|
||||
length = 4.0
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:texture")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, 3.25, 3.5, 3.75, 3.95),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [ExtResource("1_saxit"), ExtResource("3_e1fvx"), ExtResource("6_qpa7m"), ExtResource("3_e1fvx"), ExtResource("6_qpa7m"), ExtResource("3_e1fvx"), ExtResource("6_qpa7m"), ExtResource("3_e1fvx"), ExtResource("1_saxit"), ExtResource("3_e1fvx"), ExtResource("6_qpa7m"), ExtResource("3_e1fvx"), ExtResource("6_qpa7m"), ExtResource("3_e1fvx"), ExtResource("6_qpa7m"), ExtResource("3_e1fvx"), ExtResource("1_saxit")]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_xvfym"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_n0bwh"),
|
||||
"idle": SubResource("Animation_5tnw3"),
|
||||
"talking": SubResource("Animation_kkrfv")
|
||||
}
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_aq472"]
|
||||
font = ExtResource("6_pb3a7")
|
||||
font_size = 32
|
||||
|
||||
[node name="Stage" type="Node2D"]
|
||||
z_index = 100
|
||||
|
||||
|
@ -39,7 +101,7 @@ shape = SubResource("CircleShape2D_jfw8v")
|
|||
z_index = 110
|
||||
position = Vector2(-12, -142)
|
||||
scale = Vector2(0.4, 0.4)
|
||||
texture = ExtResource("1_saxit")
|
||||
texture = ExtResource("3_e1fvx")
|
||||
offset = Vector2(0, 50)
|
||||
|
||||
[node name="Joke Buttons" type="Node2D" parent="Tim"]
|
||||
|
@ -64,9 +126,40 @@ action = "joke_button_3"
|
|||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Tim/Joke Transmitter/Area2D"]
|
||||
shape = SubResource("RectangleShape2D_wmfel")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="Tim"]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_xvfym")
|
||||
}
|
||||
|
||||
[node name="Boundary" type="Node2D" parent="."]
|
||||
script = ExtResource("2_8p6ir")
|
||||
|
||||
[node name="DisplayGUI" type="CanvasLayer" parent="."]
|
||||
follow_viewport_enabled = true
|
||||
|
||||
[node name="Stamina" type="Label" parent="DisplayGUI"]
|
||||
offset_right = 80.0
|
||||
offset_bottom = 46.0
|
||||
text = "100"
|
||||
label_settings = SubResource("LabelSettings_aq472")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
script = ExtResource("6_88orn")
|
||||
|
||||
[node name="Mood" type="Label" parent="DisplayGUI"]
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -170.0
|
||||
offset_right = -10.0
|
||||
offset_bottom = 46.0
|
||||
grow_horizontal = 0
|
||||
text = "0"
|
||||
label_settings = SubResource("LabelSettings_aq472")
|
||||
horizontal_alignment = 2
|
||||
vertical_alignment = 1
|
||||
script = ExtResource("7_5m0td")
|
||||
|
||||
[connection signal="button_pressed" from="Tim/Joke Buttons/Joke Button 1" to="Tim" method="_on_joke_button_button_pressed"]
|
||||
[connection signal="button_pressed" from="Tim/Joke Buttons/Joke Button 2" to="Tim" method="_on_joke_button_button_pressed"]
|
||||
[connection signal="button_pressed" from="Tim/Joke Buttons/Joke Button 3" to="Tim" method="_on_joke_button_button_pressed"]
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://t0sw5uh5rkrl"
|
||||
path="res://.godot/imported/01_tim_cycle_silent.svg-7117bb5957b798eacaf94cfa10e93bf8.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sprites/01_tim_cycle_silent.svg"
|
||||
dest_files=["res://.godot/imported/01_tim_cycle_silent.svg-7117bb5957b798eacaf94cfa10e93bf8.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
|
@ -0,0 +1,37 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b8wnknc7uk14n"
|
||||
path="res://.godot/imported/01_tim_cycle_talk.svg-c0f0e12eb34c540d294c33e2f2d81966.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sprites/01_tim_cycle_talk.svg"
|
||||
dest_files=["res://.godot/imported/01_tim_cycle_talk.svg-c0f0e12eb34c540d294c33e2f2d81966.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
|
@ -0,0 +1,37 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cisluge3qb4l7"
|
||||
path="res://.godot/imported/02_tim_cycle_silent.svg-77d2d8f5da72bbd6523ff29f84b27dbb.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sprites/02_tim_cycle_silent.svg"
|
||||
dest_files=["res://.godot/imported/02_tim_cycle_silent.svg-77d2d8f5da72bbd6523ff29f84b27dbb.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
|
@ -0,0 +1,37 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b2pk05j8lamut"
|
||||
path="res://.godot/imported/02_tim_cycle_talk.svg-c5b613f3313a2965852984b547906370.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sprites/02_tim_cycle_talk.svg"
|
||||
dest_files=["res://.godot/imported/02_tim_cycle_talk.svg-c5b613f3313a2965852984b547906370.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
|
@ -0,0 +1,37 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dxngecca0g20b"
|
||||
path="res://.godot/imported/03_tim_cycle_silent.svg-0cb2c9133bcf2e80cb154c226596bf2a.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sprites/03_tim_cycle_silent.svg"
|
||||
dest_files=["res://.godot/imported/03_tim_cycle_silent.svg-0cb2c9133bcf2e80cb154c226596bf2a.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
|
@ -0,0 +1,37 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://khg4meq7qbcr"
|
||||
path="res://.godot/imported/03_tim_cycle_talk.svg-fd4c7147c76b859fe0b52090d4d308c8.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sprites/03_tim_cycle_talk.svg"
|
||||
dest_files=["res://.godot/imported/03_tim_cycle_talk.svg-fd4c7147c76b859fe0b52090d4d308c8.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
|
@ -0,0 +1,37 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dtd74u4eclbfk"
|
||||
path="res://.godot/imported/04_tim_cycle_silent.svg-d40597a0261de06774a879bd88019fd4.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sprites/04_tim_cycle_silent.svg"
|
||||
dest_files=["res://.godot/imported/04_tim_cycle_silent.svg-d40597a0261de06774a879bd88019fd4.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
|
@ -0,0 +1,37 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://rw87w6dw4mqr"
|
||||
path="res://.godot/imported/04_tim_cycle_talk.svg-750baee703f3e3d22fe21b88aa767b5e.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sprites/04_tim_cycle_talk.svg"
|
||||
dest_files=["res://.godot/imported/04_tim_cycle_talk.svg-750baee703f3e3d22fe21b88aa767b5e.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
|
@ -7,6 +7,8 @@ enum JokeType {
|
|||
}
|
||||
|
||||
var type: JokeType
|
||||
var required_stamina: int
|
||||
|
||||
func _init(type):
|
||||
func _init(type, required_stamina):
|
||||
self.type = type
|
||||
self.required_stamina = required_stamina
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue