removed print statements
This commit is contained in:
@@ -0,0 +1,30 @@
|
|||||||
|
[gd_scene load_steps=5 format=3 uid="uid://dv86trn5q8gf1"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://b1d2e7ely6hyw" path="res://prefabs/farm/base_field.tscn" id="1_sfxad"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://c25udixd5m6l0" path="res://prefabs/characters/Vesna.tscn" id="2_ew5cu"]
|
||||||
|
[ext_resource type="Script" uid="uid://bqomwxclsbhd3" path="res://scripts/CSharp/Common/Camera/CameraController.cs" id="3_ew5cu"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://cgjc4wurbgimy" path="res://prefabs/UI/Inventory/Inventory.tscn" id="4_hurmu"]
|
||||||
|
|
||||||
|
[node name="Node2D" type="Node2D"]
|
||||||
|
|
||||||
|
[node name="BaseField" parent="." instance=ExtResource("1_sfxad")]
|
||||||
|
metadata/SaveID = "5465420354651"
|
||||||
|
|
||||||
|
[node name="Vesna" parent="." instance=ExtResource("2_ew5cu")]
|
||||||
|
position = Vector2(-751, -388)
|
||||||
|
|
||||||
|
[node name="Camera2D" type="Camera2D" parent="." node_paths=PackedStringArray("_followNode")]
|
||||||
|
position = Vector2(-1534, -26)
|
||||||
|
offset = Vector2(0, -200)
|
||||||
|
zoom = Vector2(0.5, 0.5)
|
||||||
|
limit_left = -6300
|
||||||
|
limit_top = -1050
|
||||||
|
limit_right = 1400
|
||||||
|
limit_bottom = 1150
|
||||||
|
editor_draw_limits = true
|
||||||
|
script = ExtResource("3_ew5cu")
|
||||||
|
_followNode = NodePath("../Vesna/CharacterBody2D")
|
||||||
|
|
||||||
|
[node name="CanvasLayer" parent="." instance=ExtResource("4_hurmu")]
|
||||||
|
|
||||||
|
[editable path="Vesna"]
|
||||||
@@ -13,12 +13,10 @@ public partial class DetectableInteractionArea : Area2D
|
|||||||
{
|
{
|
||||||
if (instanceID.AsString() == GetInstanceId().ToString())
|
if (instanceID.AsString() == GetInstanceId().ToString())
|
||||||
{
|
{
|
||||||
GD.Print("InteractionArea: Selected.");
|
|
||||||
interactionArea2D.HighlightInteractable();
|
interactionArea2D.HighlightInteractable();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GD.Print("InteractionArea: Not Selected.");
|
|
||||||
interactionArea2D.ResetHighlight();
|
interactionArea2D.ResetHighlight();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ public partial class Detector : Area2D
|
|||||||
|
|
||||||
private void CalculateClosestInteractable()
|
private void CalculateClosestInteractable()
|
||||||
{
|
{
|
||||||
GD.Print($"Areas in detector: {_areasInDetector.Count}");
|
|
||||||
float smallestDistance = float.MaxValue;
|
float smallestDistance = float.MaxValue;
|
||||||
string closestInteractable = null;
|
string closestInteractable = null;
|
||||||
foreach (var area in _areasInDetector)
|
foreach (var area in _areasInDetector)
|
||||||
@@ -92,7 +91,6 @@ public partial class Detector : Area2D
|
|||||||
smallestDistance = distance;
|
smallestDistance = distance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GD.Print($"Closest interactable: {closestInteractable}");
|
|
||||||
_itemToTriggerResource.Payload = closestInteractable;
|
_itemToTriggerResource.Payload = closestInteractable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ public partial class InteractionArea2D : Node2D
|
|||||||
|
|
||||||
public void HighlightInteractable()
|
public void HighlightInteractable()
|
||||||
{
|
{
|
||||||
GD.Print($"InteractionArea: Trying to highlight interactable. Current state: Active {_active}, Input Enabled {InputService.Instance.InputEnabled}, show label: {_showLabel} and use outline {_useOutline}.");
|
|
||||||
IsSelectedByDetector = true;
|
IsSelectedByDetector = true;
|
||||||
|
|
||||||
if (!_active || !InputService.Instance.InputEnabled)
|
if (!_active || !InputService.Instance.InputEnabled)
|
||||||
@@ -73,7 +72,6 @@ public partial class InteractionArea2D : Node2D
|
|||||||
|
|
||||||
public void ResetHighlight()
|
public void ResetHighlight()
|
||||||
{
|
{
|
||||||
GD.Print($"InteractionArea: Resetting interactable. Current state: show label: {_showLabel} and use outline {_useOutline}.");
|
|
||||||
IsSelectedByDetector = false;
|
IsSelectedByDetector = false;
|
||||||
_label.Hide();
|
_label.Hide();
|
||||||
|
|
||||||
@@ -108,10 +106,8 @@ public partial class InteractionArea2D : Node2D
|
|||||||
|
|
||||||
private void TryInteract()
|
private void TryInteract()
|
||||||
{
|
{
|
||||||
GD.Print("InteractionArea: Trying to interact.");
|
|
||||||
if (_area.HasOverlappingAreas())
|
if (_area.HasOverlappingAreas())
|
||||||
{
|
{
|
||||||
GD.Print("InteractionArea: Interacting.");
|
|
||||||
ResetHighlight();
|
ResetHighlight();
|
||||||
Interact();
|
Interact();
|
||||||
}
|
}
|
||||||
@@ -131,7 +127,6 @@ public partial class InteractionArea2D : Node2D
|
|||||||
|
|
||||||
public void ToggleActive()
|
public void ToggleActive()
|
||||||
{
|
{
|
||||||
GD.Print("InteractionArea: Toggled active state");
|
|
||||||
_active = !_active;
|
_active = !_active;
|
||||||
_label.Hide();
|
_label.Hide();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user