Code cleanup part 2
This commit is contained in:
+1657
-1657
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,13 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://cqc72e4hq6bcd"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ckp413wrub5fm" path="res://scripts/CSharp/Common/CharacterControls/InteractionArea2D.cs" id="1_6svbd"]
|
||||
[ext_resource type="Script" uid="uid://ckp413wrub5fm" path="res://scripts/CSharp/Common/CharacterControls/InteractionArea2D.cs" id="1_5ajrf"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_npluf"]
|
||||
resource_local_to_scene = true
|
||||
radius = 300.0
|
||||
|
||||
[node name="InteractionArea" type="Node2D" node_paths=PackedStringArray("_area", "_label")]
|
||||
script = ExtResource("1_6svbd")
|
||||
script = ExtResource("1_5ajrf")
|
||||
_area = NodePath("Area2D")
|
||||
_label = NodePath("Label")
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=20 format=3 uid="uid://bm21nqepnwaik"]
|
||||
[gd_scene load_steps=19 format=3 uid="uid://bm21nqepnwaik"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://c25udixd5m6l0" path="res://prefabs/interactions/Player2D.tscn" id="2_a2ood"]
|
||||
[ext_resource type="Texture2D" uid="uid://waqmjrxduxfq" path="res://art/indoor/room export/Room_01_walls.png" id="3_a2ood"]
|
||||
@@ -13,7 +13,6 @@
|
||||
[ext_resource type="Texture2D" uid="uid://bpi35nxbhput8" path="res://art/indoor/room export/Room_01_pechkaDoor.png" id="10_835kg"]
|
||||
[ext_resource type="Texture2D" uid="uid://tyypifpte0pb" path="res://art/indoor/room export/Room_01_chugun.png" id="11_atjbs"]
|
||||
[ext_resource type="Texture2D" uid="uid://x7trh4dgsvoe" path="res://art/indoor/room export/Room_01_assets.png" id="13_j5d18"]
|
||||
[ext_resource type="Script" path="res://scripts/spiritAnimation.cs" id="14_ciwvv"]
|
||||
[ext_resource type="Texture2D" uid="uid://ckvytnpi8gcxq" path="res://art/eyes_atlas.png" id="14_j5d18"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_a2ood"]
|
||||
@@ -255,16 +254,13 @@ offset = Vector2(43.3898, 128.128)
|
||||
region_enabled = true
|
||||
region_rect = Rect2(3362, 139, 101, 269)
|
||||
|
||||
[node name="SpiritAnimation" type="AnimationPlayer" parent="Room assets/hand" node_paths=PackedStringArray("_player", "_offerings")]
|
||||
[node name="SpiritAnimation" type="AnimationPlayer" parent="Room assets/hand"]
|
||||
active = false
|
||||
root_node = NodePath("../../..")
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_ciwvv")
|
||||
}
|
||||
playback_auto_capture = false
|
||||
script = ExtResource("14_ciwvv")
|
||||
_player = NodePath("../../../Player2d/CharacterBody2D")
|
||||
_offerings = NodePath("../../offerings")
|
||||
|
||||
[node name="herbsline" type="Sprite2D" parent="Room assets"]
|
||||
y_sort_enabled = true
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
using Godot;
|
||||
|
||||
namespace Babushka.scripts.CSharp.Common.CharacterControls;
|
||||
|
||||
public partial class InteractionArea : Node3D
|
||||
{
|
||||
[Export] private Area3D _area;
|
||||
[Export] private Label3D _label;
|
||||
[Export] private bool _showLabel = true;
|
||||
|
||||
[Signal]
|
||||
public delegate void InteractedEventHandler();
|
||||
|
||||
public void OnPlayerEntered(Node3D player)
|
||||
{
|
||||
if(_showLabel)
|
||||
_label.Show();
|
||||
}
|
||||
|
||||
public void OnPlayerExited(Node3D player)
|
||||
{
|
||||
_label.Hide();
|
||||
}
|
||||
|
||||
public override void _Input(InputEvent @event)
|
||||
{
|
||||
if (@event.IsAction("interact") && @event.IsPressed() && _area.HasOverlappingBodies())
|
||||
{
|
||||
_label.Hide();
|
||||
EmitSignal(SignalName.Interacted);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
uid://5fwv33fkvy5
|
||||
@@ -1,16 +0,0 @@
|
||||
using Godot;
|
||||
|
||||
namespace Babushka.scripts.CSharp.Common.Inventory;
|
||||
|
||||
public partial class ItemOnGroundSpawnWith2D : Node
|
||||
{
|
||||
[Export] private ItemResource? _blueprint = null;
|
||||
|
||||
public override void _EnterTree()
|
||||
{
|
||||
if(_blueprint == null) return;
|
||||
|
||||
var parent = GetParent<ItemOnGround2D>();
|
||||
parent.itemInstance = new ItemInstance { blueprint = _blueprint };
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
uid://bdsel2amlbnuq
|
||||
Reference in New Issue
Block a user