From 920c5c27fb732c902987b01dcc093e55b1552a9f Mon Sep 17 00:00:00 2001 From: Conor Edmonds Date: Mon, 14 Jul 2025 18:14:48 -0400 Subject: [PATCH] `date` --- Gameplay/Actor.cs | 6 ++++-- Gameplay/Ball.cs | 1 + Gameplay/Battle.cs | 2 -- Gameplay/actor.tscn | 2 ++ Gameplay/battle.tscn | 2 -- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Gameplay/Actor.cs b/Gameplay/Actor.cs index 7ebd4f6..10f727c 100644 --- a/Gameplay/Actor.cs +++ b/Gameplay/Actor.cs @@ -41,11 +41,13 @@ public partial class Actor : Node { if (!_activeBall._placed) { + _activeCue.HideCue(); Vector2 mousePosition = GetViewport().GetMousePosition(); - _activeBall.Position = mousePosition; + GetNode("StartPosition").Position = mousePosition; if (Input.IsActionJustReleased("left_click")) { - _activeBall.Place(mousePosition); + _activeBall.Place(GetNode("StartPosition").Position); + GD.Print(_activeBall.Position); } } else diff --git a/Gameplay/Ball.cs b/Gameplay/Ball.cs index 00aa1ac..7ada81a 100644 --- a/Gameplay/Ball.cs +++ b/Gameplay/Ball.cs @@ -47,6 +47,7 @@ public partial class Ball : RigidBody2D } else if (LinearVelocity.Length() >= _moveThreshold) { + GD.Print(Position); if (!_moving) { _moving = true; diff --git a/Gameplay/Battle.cs b/Gameplay/Battle.cs index 0d220b0..8ddcbc3 100644 --- a/Gameplay/Battle.cs +++ b/Gameplay/Battle.cs @@ -88,13 +88,11 @@ public partial class Battle : Node } if (BODY == _player._actor._activeBall) { - GD.Print(1); _player._actor._activeBall._potted = true; _player._actor._activeBall._placed = false; } else { - GD.Print(BODY); Sprite2D ballSprite = new Sprite2D(); AddChild(ballSprite); ballSprite.Texture = BODY.GetNode("Image").Texture; diff --git a/Gameplay/actor.tscn b/Gameplay/actor.tscn index 32dd72f..844bd18 100644 --- a/Gameplay/actor.tscn +++ b/Gameplay/actor.tscn @@ -4,3 +4,5 @@ [node name="Actor" type="Node"] script = ExtResource("1_hr3hk") + +[node name="StartPosition" type="Marker2D" parent="."] diff --git a/Gameplay/battle.tscn b/Gameplay/battle.tscn index 2f8f5c0..134eba4 100644 --- a/Gameplay/battle.tscn +++ b/Gameplay/battle.tscn @@ -23,5 +23,3 @@ offset_top = 678.0 offset_right = 1200.0 offset_bottom = 778.0 theme_override_styles/panel = SubResource("StyleBoxFlat_tivnh") - -[connection signal="SetCurrent" from="." to="Player" method="BattleStart"]