From 4d2762773e36a58f5828563d9c69215b68897408 Mon Sep 17 00:00:00 2001 From: Mikhail Aristov <12281487+MikhailAristov@users.noreply.github.com> Date: Sat, 27 Jan 2024 14:08:40 +0100 Subject: [PATCH] +bodies --- godot/scenes/crowd/person.gd | 2 +- godot/scenes/crowd/person.tscn | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/godot/scenes/crowd/person.gd b/godot/scenes/crowd/person.gd index 9977bc0..829dfc2 100644 --- a/godot/scenes/crowd/person.gd +++ b/godot/scenes/crowd/person.gd @@ -1,5 +1,5 @@ class_name AudienceMember -extends Sprite2D +extends Node2D @export var mood : float = 0. diff --git a/godot/scenes/crowd/person.tscn b/godot/scenes/crowd/person.tscn index 8e2a221..5c71024 100644 --- a/godot/scenes/crowd/person.tscn +++ b/godot/scenes/crowd/person.tscn @@ -2,19 +2,23 @@ [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) +[ext_resource type="Texture2D" uid="uid://dqxv2u4xiwiup" path="res://sprites/bodies/body_blue_2.svg" id="2_t0w5c"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_5rd5b"] -[node name="Person" type="Sprite2D" node_paths=PackedStringArray("head", "profile")] -texture = SubResource("PlaceholderTexture2D_kbo53") +[node name="Person" type="Node2D" node_paths=PackedStringArray("head", "profile")] script = ExtResource("1_mx0i8") head = NodePath("Head") profile = NodePath("Profile") expression = 1 +[node name="Body" type="Node2D" parent="."] +position = Vector2(0, 15) +scale = Vector2(0.3, 0.3) + +[node name="BodyBlue2" type="Sprite2D" parent="Body"] +texture = ExtResource("2_t0w5c") + [node name="Head" type="Node2D" parent="."] position = Vector2(0, -16) scale = Vector2(0.3, 0.3)