diff --git a/godot/scenes/crowd/person.gd b/godot/scenes/crowd/person.gd index 5f68853..765ab14 100644 --- a/godot/scenes/crowd/person.gd +++ b/godot/scenes/crowd/person.gd @@ -77,10 +77,6 @@ func _input(event): elif Input.is_key_pressed(KEY_ENTER): update_mood(-1.) -func hear_joke(): - var change = randf_range(-3., 3.) - update_mood(change) - func update_mood(change: float): if mood > profile.happy_threshold and change > 0 and laughter_left <= 0: laughter_left = laughter_duration diff --git a/godot/scenes/crowd/person.tscn b/godot/scenes/crowd/person.tscn index 9201892..40693a1 100644 --- a/godot/scenes/crowd/person.tscn +++ b/godot/scenes/crowd/person.tscn @@ -1,21 +1,20 @@ -[gd_scene load_steps=4 format=3 uid="uid://cl4fax7fbh2g7"] +[gd_scene load_steps=5 format=3 uid="uid://cl4fax7fbh2g7"] [ext_resource type="Script" path="res://scenes/crowd/person.gd" id="1_mx0i8"] [ext_resource type="Script" path="res://scenes/crowd/audience_profile.gd" id="2_bsodr"] +[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_kbo53"] +size = Vector2(20, 30) + [sub_resource type="RectangleShape2D" id="RectangleShape2D_5rd5b"] -[node name="Person" type="Node2D" node_paths=PackedStringArray("head", "body", "profile")] +[node name="Person" type="Sprite2D" node_paths=PackedStringArray("head", "profile")] +texture = SubResource("PlaceholderTexture2D_kbo53") script = ExtResource("1_mx0i8") head = NodePath("Head") -body = NodePath("Body") profile = NodePath("Profile") expression = 1 -[node name="Body" type="Node2D" parent="."] -position = Vector2(0, 15) -scale = Vector2(0.3, 0.3) - [node name="Head" type="Node2D" parent="."] position = Vector2(0, -16) scale = Vector2(0.3, 0.3)