From 2eb95b18fd5546d6ffb69ad785d5d772357b2d93 Mon Sep 17 00:00:00 2001 From: cojoedmo Date: Wed, 20 Aug 2025 02:02:42 -0400 Subject: [PATCH] Wednesday, 20 August 2025 02:02:40 --- Gameplay/Action.cs | 28 ++++++++++++ Gameplay/{Effect.cs.uid => Action.cs.uid} | 0 Gameplay/Actions/BasicAttack.cs | 35 +++++++++++++++ .../{Effects => Actions}/BasicAttack.cs.uid | 0 Gameplay/Actions/Caffeinate.cs | 26 +++++++++++ .../{Effects => Actions}/Caffeinate.cs.uid | 0 .../{Effects => Actions}/basic_attack.tscn | 0 Gameplay/Actions/caffeinate.tscn | 6 +++ Gameplay/Condition.cs | 29 ++++++++++++ Gameplay/Condition.cs.uid | 1 + Gameplay/Conditions/Spiky.cs | 24 ++++++++++ Gameplay/{Effects => Conditions}/Spiky.cs.uid | 0 Gameplay/Conditions/spiky.tscn | 6 +++ Gameplay/Effect.cs | 35 --------------- Gameplay/Effects/BasicAttack.cs | 30 ------------- Gameplay/Effects/Caffeinate.cs | 22 ---------- Gameplay/Effects/Spiky.cs | 20 --------- Gameplay/Effects/caffeinate.tscn | 6 --- Gameplay/Effects/spiky.tscn | 6 --- Gameplay/Manager.cs | 3 +- Gameplay/Tchotchke.cs | 44 +++++++++++-------- Gameplay/Tchotchkes/AwfullyHotCoffeePot.cs | 2 +- .../Tchotchkes/awfully_hot_coffee_pot.tscn | 4 -- Gameplay/Tchotchkes/red_stapler.tscn | 4 -- Gameplay/Trigger.cs | 22 ++++++++++ Gameplay/Trigger.cs.uid | 1 + Gameplay/Worker.cs | 32 ++++++++------ Gameplay/action.tscn | 3 ++ Gameplay/condition.tscn | 6 +++ Gameplay/effect.tscn | 4 +- Gameplay/tchotchke.tscn | 4 -- Gameplay/trigger.tscn | 6 +++ 32 files changed, 242 insertions(+), 167 deletions(-) create mode 100644 Gameplay/Action.cs rename Gameplay/{Effect.cs.uid => Action.cs.uid} (100%) create mode 100644 Gameplay/Actions/BasicAttack.cs rename Gameplay/{Effects => Actions}/BasicAttack.cs.uid (100%) create mode 100644 Gameplay/Actions/Caffeinate.cs rename Gameplay/{Effects => Actions}/Caffeinate.cs.uid (100%) rename Gameplay/{Effects => Actions}/basic_attack.tscn (100%) create mode 100644 Gameplay/Actions/caffeinate.tscn create mode 100644 Gameplay/Condition.cs create mode 100644 Gameplay/Condition.cs.uid create mode 100644 Gameplay/Conditions/Spiky.cs rename Gameplay/{Effects => Conditions}/Spiky.cs.uid (100%) create mode 100644 Gameplay/Conditions/spiky.tscn delete mode 100644 Gameplay/Effect.cs delete mode 100644 Gameplay/Effects/BasicAttack.cs delete mode 100644 Gameplay/Effects/Caffeinate.cs delete mode 100644 Gameplay/Effects/Spiky.cs delete mode 100644 Gameplay/Effects/caffeinate.tscn delete mode 100644 Gameplay/Effects/spiky.tscn create mode 100644 Gameplay/Trigger.cs create mode 100644 Gameplay/Trigger.cs.uid create mode 100644 Gameplay/action.tscn create mode 100644 Gameplay/condition.tscn create mode 100644 Gameplay/trigger.tscn diff --git a/Gameplay/Action.cs b/Gameplay/Action.cs new file mode 100644 index 0000000..e07032b --- /dev/null +++ b/Gameplay/Action.cs @@ -0,0 +1,28 @@ +using Godot; +using System; +using System.Collections.Generic; + +public partial class Action : Node +{ + public Node _target; + public List _triggers = new(); + public List _expirations = new(); + public Node2D _owner; + + public Action(Node2D OWNER) + { + _owner = OWNER; + } + + public virtual void Fire() + { + + } + + public virtual void Target(Node TARGET) + { + _target = TARGET; + } + + +} diff --git a/Gameplay/Effect.cs.uid b/Gameplay/Action.cs.uid similarity index 100% rename from Gameplay/Effect.cs.uid rename to Gameplay/Action.cs.uid diff --git a/Gameplay/Actions/BasicAttack.cs b/Gameplay/Actions/BasicAttack.cs new file mode 100644 index 0000000..877d735 --- /dev/null +++ b/Gameplay/Actions/BasicAttack.cs @@ -0,0 +1,35 @@ +using Godot; +using System; +using System.Collections.Generic; + +public partial class BasicAttack : Action +{ + public BasicAttack(Node2D OWNER) : base(OWNER) + { + _triggers.Add(Trigger.On.Collision); + } + + public override void Fire() + { + if (_target != null) + { + if (_target is Worker) + { + Worker target = (Worker)_target; + if (_owner is Worker) + { + Worker owner = (Worker)_owner; + if (target._manager != owner._manager) + { + int damage = -owner._aptitude / 2; + target.ChangeHealth(damage, owner); + } + } + + } + _target = null; + } + + } + +} diff --git a/Gameplay/Effects/BasicAttack.cs.uid b/Gameplay/Actions/BasicAttack.cs.uid similarity index 100% rename from Gameplay/Effects/BasicAttack.cs.uid rename to Gameplay/Actions/BasicAttack.cs.uid diff --git a/Gameplay/Actions/Caffeinate.cs b/Gameplay/Actions/Caffeinate.cs new file mode 100644 index 0000000..50cb56c --- /dev/null +++ b/Gameplay/Actions/Caffeinate.cs @@ -0,0 +1,26 @@ +using Godot; +using System; + +public partial class Caffeinate : Action +{ + public Caffeinate(Node2D OWNER) : base(OWNER) + { + _triggers.Add(Trigger.On.Collision); + } + + public override void Fire() + { + if (_target != null) + { + if (_target is Worker) + { + Worker target = (Worker)_target; + target._rotationalForce += 10; + Vector2 targetDistanceNormal = (target.Position - _owner.Position).Normalized(); + target.ApplyCentralForce(targetDistanceNormal * 10); + target.ChangeHealth(-1, _owner); + } + _target = null; + } + } +} diff --git a/Gameplay/Effects/Caffeinate.cs.uid b/Gameplay/Actions/Caffeinate.cs.uid similarity index 100% rename from Gameplay/Effects/Caffeinate.cs.uid rename to Gameplay/Actions/Caffeinate.cs.uid diff --git a/Gameplay/Effects/basic_attack.tscn b/Gameplay/Actions/basic_attack.tscn similarity index 100% rename from Gameplay/Effects/basic_attack.tscn rename to Gameplay/Actions/basic_attack.tscn diff --git a/Gameplay/Actions/caffeinate.tscn b/Gameplay/Actions/caffeinate.tscn new file mode 100644 index 0000000..dd98218 --- /dev/null +++ b/Gameplay/Actions/caffeinate.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=3 uid="uid://bo2rj0albmkkw"] + +[ext_resource type="Script" path="res://Gameplay/Effects/Caffeinate.cs" id="1_l8me6"] + +[node name="Caffeinate" type="Node"] +script = ExtResource("1_l8me6") diff --git a/Gameplay/Condition.cs b/Gameplay/Condition.cs new file mode 100644 index 0000000..b8b76d8 --- /dev/null +++ b/Gameplay/Condition.cs @@ -0,0 +1,29 @@ +using Godot; +using System; +using System.Collections.Generic; + +public partial class Condition : Node +{ + public bool _canExpire; + public int _countdown; + public Node _target; + public List _triggers = new(); + public List _expirations = new(); + public Node2D _owner; + + public Condition(Node2D OWNER) + { + _owner = OWNER; + } + + public virtual void Fire() + { + + } + + public virtual void Target(Node TARGET) + { + _target = TARGET; + } + +} diff --git a/Gameplay/Condition.cs.uid b/Gameplay/Condition.cs.uid new file mode 100644 index 0000000..3670473 --- /dev/null +++ b/Gameplay/Condition.cs.uid @@ -0,0 +1 @@ +uid://vj2qucjwah5y diff --git a/Gameplay/Conditions/Spiky.cs b/Gameplay/Conditions/Spiky.cs new file mode 100644 index 0000000..2c9c51a --- /dev/null +++ b/Gameplay/Conditions/Spiky.cs @@ -0,0 +1,24 @@ +using Godot; +using System; + +public partial class Spiky : Condition +{ + public Spiky(Node2D OWNER) : base(OWNER) + { + _triggers.Add(Trigger.On.Collision); + } + + public override void Fire() + { + if (_target != null) + { + if (_target is Worker) + { + Worker target = (Worker)_target; + target._rotationalForce += 10; + target.ChangeHealth(-1, _owner); + } + _target = null; + } + } +} diff --git a/Gameplay/Effects/Spiky.cs.uid b/Gameplay/Conditions/Spiky.cs.uid similarity index 100% rename from Gameplay/Effects/Spiky.cs.uid rename to Gameplay/Conditions/Spiky.cs.uid diff --git a/Gameplay/Conditions/spiky.tscn b/Gameplay/Conditions/spiky.tscn new file mode 100644 index 0000000..0767fed --- /dev/null +++ b/Gameplay/Conditions/spiky.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=3 uid="uid://devvkr2joh1u2"] + +[ext_resource type="Script" path="res://Gameplay/Effects/Spiky.cs" id="1_pcknv"] + +[node name="Spiky" type="Node"] +script = ExtResource("1_pcknv") diff --git a/Gameplay/Effect.cs b/Gameplay/Effect.cs deleted file mode 100644 index 25226af..0000000 --- a/Gameplay/Effect.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Godot; -using System; -using System.Collections.Generic; - -public partial class Effect : Node -{ - public List _trigger = new(); - public List _expirations = new(); - public Node2D _owner; - - public Effect(Node2D OWNER) - { - _owner = OWNER; - } - - public virtual void TriggerEffect(Node TARGET = null) - { - - } - - public enum Trigger - { - Movement, - Collision, - WallCollision, - Death, - Launch, - Stop, - BattleStart, - BattleEnd, - Critical, - Defend, - Time - } -} diff --git a/Gameplay/Effects/BasicAttack.cs b/Gameplay/Effects/BasicAttack.cs deleted file mode 100644 index 979dc85..0000000 --- a/Gameplay/Effects/BasicAttack.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Godot; -using System; -using System.Collections.Generic; - -public partial class BasicAttack : Effect -{ - public BasicAttack(Node2D OWNER) : base(OWNER) - { - _trigger.Add(Trigger.Collision); - } - - public override void TriggerEffect(Node TARGET = null) - { - if (TARGET is Worker) - { - Worker target = (Worker)TARGET; - if (_owner is Worker) - { - Worker owner = (Worker)_owner; - if (target._manager != owner._manager) - { - int damage = -owner._aptitude / 2; - target.ChangeHealth(damage, owner); - } - } - - } - } - -} diff --git a/Gameplay/Effects/Caffeinate.cs b/Gameplay/Effects/Caffeinate.cs deleted file mode 100644 index 443337c..0000000 --- a/Gameplay/Effects/Caffeinate.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Godot; -using System; - -public partial class Caffeinate : Effect -{ - public Caffeinate(Node2D OWNER) : base(OWNER) - { - _trigger.Add(Trigger.Collision); - } - - public override void TriggerEffect(Node TARGET = null) - { - if (TARGET is Worker) - { - Worker target = (Worker)TARGET; - target._rotationalForce += 10; - Vector2 targetDistanceNormal = (target.Position - _owner.Position).Normalized(); - target.ApplyCentralForce(targetDistanceNormal * 10); - target.ChangeHealth(-1, _owner); - } - } -} diff --git a/Gameplay/Effects/Spiky.cs b/Gameplay/Effects/Spiky.cs deleted file mode 100644 index e1c9411..0000000 --- a/Gameplay/Effects/Spiky.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Godot; -using System; - -public partial class Spiky : Effect -{ - public Spiky(Node2D OWNER) : base(OWNER) - { - _trigger.Add(Trigger.Collision); - } - - public override void TriggerEffect(Node TARGET = null) - { - if (TARGET is Worker) - { - Worker target = (Worker)TARGET; - target._rotationalForce += 10; - target.ChangeHealth(-1, _owner); - } - } -} diff --git a/Gameplay/Effects/caffeinate.tscn b/Gameplay/Effects/caffeinate.tscn deleted file mode 100644 index 352e439..0000000 --- a/Gameplay/Effects/caffeinate.tscn +++ /dev/null @@ -1,6 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://bo2rj0albmkkw"] - -[ext_resource type="Script" uid="uid://cbk76ik5o17nx" path="res://Gameplay/Effects/Caffeinate.cs" id="1_2f3ha"] - -[node name="Caffeinate" type="Node"] -script = ExtResource("1_2f3ha") diff --git a/Gameplay/Effects/spiky.tscn b/Gameplay/Effects/spiky.tscn deleted file mode 100644 index 8c2f2b6..0000000 --- a/Gameplay/Effects/spiky.tscn +++ /dev/null @@ -1,6 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://cchjk4lohg8k3"] - -[ext_resource type="Script" uid="uid://ciwja82k4ihw6" path="res://Gameplay/Effects/Spiky.cs" id="1_levtu"] - -[node name="Spiky" type="Node"] -script = ExtResource("1_levtu") diff --git a/Gameplay/Manager.cs b/Gameplay/Manager.cs index 1f33686..2b6e97a 100644 --- a/Gameplay/Manager.cs +++ b/Gameplay/Manager.cs @@ -41,11 +41,10 @@ public partial class Manager : Node for (int i = 0; i < _workers.Count; i++) { - GD.Print(i + 1); _workers[i]._healthBar.Position = _managerPanel.GetNode("Team").GetNode("T"+(i+1)).GlobalPosition; } - AwfullyHotCoffeePot newTchotchke = ResourceLoader.Load("res://Gameplay/Tchotchkes/awfully_hot_coffee_pot.tscn").Instantiate(); + Tchotchke newTchotchke = ResourceLoader.Load("res://Gameplay/Tchotchkes/awfully_hot_coffee_pot.tscn").Instantiate(); newTchotchke.Position = new Vector2(Globals.Instance._screenSize.X - 100, Globals.Instance._screenCenter.Y); AddChild(newTchotchke); _tchotckes.Add(newTchotchke); diff --git a/Gameplay/Tchotchke.cs b/Gameplay/Tchotchke.cs index 5520a1f..319ba05 100644 --- a/Gameplay/Tchotchke.cs +++ b/Gameplay/Tchotchke.cs @@ -1,11 +1,19 @@ using Godot; using System; using System.Collections.Generic; +using System.Linq; public partial class Tchotchke : StaticBody2D { public bool _hovered = false, _held = false; - public List _effects = new(); + public List _actions = new(); + public Node _target; + + public override void _Ready() + { + MouseEntered += OnMouseEntered; + MouseExited += OnMouseExited; + } public override void _Process(double DELTA_) { @@ -47,6 +55,18 @@ public partial class Tchotchke : StaticBody2D _held = false; } } + + public void FireActions(Trigger.On TRIGGER, Node TARGET = null) + { + List triggeredActions = _actions.Where(e => e._triggers.IndexOf(TRIGGER) > -1).ToList(); + for (int i = 0; i < triggeredActions.Count; i++) + { + triggeredActions[i].Target(TARGET); + triggeredActions[i].Fire(); + } + List expiredActions = _actions.Where(e => e._triggers.IndexOf(TRIGGER) > -1).ToList(); + _actions.Except(expiredActions); + } public void Hold() { @@ -56,8 +76,6 @@ public partial class Tchotchke : StaticBody2D } _held = true; } - - // Processes // PRIVATE METHODS private void OnMouseEntered() @@ -65,20 +83,10 @@ public partial class Tchotchke : StaticBody2D _hovered = true; } - private void OnMouseExited() - { - _hovered = false; - } + private void OnMouseExited() + { + _hovered = false; + } - private void OnBodyEntered(Node NODE) - { - if (NODE is Worker) - { - for (int i = 0; i < _effects.Count; i++) - { - GD.Print(1001); - _effects[i].TriggerEffect((Worker)NODE); - } - } - } + } diff --git a/Gameplay/Tchotchkes/AwfullyHotCoffeePot.cs b/Gameplay/Tchotchkes/AwfullyHotCoffeePot.cs index a24b1b4..c0fc52e 100644 --- a/Gameplay/Tchotchkes/AwfullyHotCoffeePot.cs +++ b/Gameplay/Tchotchkes/AwfullyHotCoffeePot.cs @@ -5,6 +5,6 @@ public partial class AwfullyHotCoffeePot : Tchotchke { public AwfullyHotCoffeePot() : base() { - _effects.Add(new Caffeinate(this)); + _actions.Add(new Caffeinate(this)); } } diff --git a/Gameplay/Tchotchkes/awfully_hot_coffee_pot.tscn b/Gameplay/Tchotchkes/awfully_hot_coffee_pot.tscn index ca25e6f..1186689 100644 --- a/Gameplay/Tchotchkes/awfully_hot_coffee_pot.tscn +++ b/Gameplay/Tchotchkes/awfully_hot_coffee_pot.tscn @@ -30,7 +30,3 @@ gravity = 5.0 [node name="CollisionShape2D" type="CollisionShape2D" parent="Gravity"] shape = SubResource("CircleShape2D_yxdnl") - -[connection signal="mouse_entered" from="." to="." method="OnMouseEntered"] -[connection signal="mouse_exited" from="." to="." method="OnMouseExited"] -[connection signal="body_entered" from="Gravity" to="." method="OnBodyEntered"] diff --git a/Gameplay/Tchotchkes/red_stapler.tscn b/Gameplay/Tchotchkes/red_stapler.tscn index 335c4fa..e8dccb7 100644 --- a/Gameplay/Tchotchkes/red_stapler.tscn +++ b/Gameplay/Tchotchkes/red_stapler.tscn @@ -29,7 +29,3 @@ gravity = 5.0 [node name="CollisionShape2D" type="CollisionShape2D" parent="Gravity"] shape = SubResource("CapsuleShape2D_1dddf") - -[connection signal="mouse_entered" from="." to="." method="OnMouseEntered"] -[connection signal="mouse_exited" from="." to="." method="OnMouseExited"] -[connection signal="body_entered" from="Gravity" to="." method="OnBodyEntered"] diff --git a/Gameplay/Trigger.cs b/Gameplay/Trigger.cs new file mode 100644 index 0000000..d3eb537 --- /dev/null +++ b/Gameplay/Trigger.cs @@ -0,0 +1,22 @@ +using Godot; +using System; + +public partial class Trigger : Node +{ + public Timer _timer; + public int _distance; + public enum On + { + Movement, + Collision, + WallCollision, + Death, + Launch, + Stop, + BattleStart, + BattleEnd, + Critical, + Defend, + Time + } +} diff --git a/Gameplay/Trigger.cs.uid b/Gameplay/Trigger.cs.uid new file mode 100644 index 0000000..d623d67 --- /dev/null +++ b/Gameplay/Trigger.cs.uid @@ -0,0 +1 @@ +uid://g0mmh73fptyg diff --git a/Gameplay/Worker.cs b/Gameplay/Worker.cs index 17f4116..2c79139 100644 --- a/Gameplay/Worker.cs +++ b/Gameplay/Worker.cs @@ -14,7 +14,7 @@ public partial class Worker : RigidBody2D public Sprite2D _image; public ProgressBar _healthBar; public Manager _manager; - public List _effects = new(); + public List _Actions = new(); public override void _Ready() { _health = 10; @@ -28,7 +28,7 @@ public partial class Worker : RigidBody2D _healthMax = _health; _image = GetNode("Sprite2D"); - _effects.Add(new BasicAttack(this)); + _Actions.Add(new BasicAttack(this)); _healthBar = GetNode("HealthBar"); _healthBar.MaxValue = _healthMax; @@ -117,7 +117,7 @@ public partial class Worker : RigidBody2D Sleeping = true; _dead = true; _health = 0; - TriggerSpecificEffects(Effect.Trigger.Death, _manager); + FireActions(Trigger.On.Death, _manager); } } @@ -149,7 +149,7 @@ public partial class Worker : RigidBody2D ApplyCentralForce(_force); _force = Vector2.Zero; _primed = false; - TriggerSpecificEffects(Effect.Trigger.Launch, _manager); + FireActions(Trigger.On.Launch, _manager); } public void Stop() @@ -158,18 +158,19 @@ public partial class Worker : RigidBody2D Sleeping = true; _moving = false; _rotationalForce = 0f; - TriggerSpecificEffects(Effect.Trigger.Stop, _manager); + FireActions(Trigger.On.Stop, _manager); } - public void TriggerSpecificEffects(Effect.Trigger TRIGGER, Node TARGET = null) + public void FireActions(Trigger.On TRIGGER, Node TARGET = null) { - List triggeredEffects = _effects.Where(e => e._trigger.IndexOf(TRIGGER) > -1).ToList(); - for (int i = 0; i < triggeredEffects.Count; i++) + List triggeredActions = _Actions.Where(e => e._triggers.IndexOf(TRIGGER) > -1).ToList(); + for (int i = 0; i < triggeredActions.Count; i++) { - triggeredEffects[i].TriggerEffect(TARGET); + triggeredActions[i].Target(TARGET); + triggeredActions[i].Fire(); } - List expiredEffects = _effects.Where(e => e._trigger.IndexOf(TRIGGER) > -1).ToList(); - _effects.Except(expiredEffects); + List expiredActions = _Actions.Where(e => e._triggers.IndexOf(TRIGGER) > -1).ToList(); + _Actions.Except(expiredActions); } // PRIVATE METHODS @@ -188,14 +189,19 @@ public partial class Worker : RigidBody2D if (NODE is Worker) { _collisionTarget = NODE; - TriggerSpecificEffects(Effect.Trigger.Collision, NODE); + FireActions(Trigger.On.Collision, NODE); _rotationalForce *= 0.8f; Vector2 rotatedForce = LinearVelocity.Rotated(((Worker)NODE)._rotationalForce); - + ApplyCentralForce(rotatedForce); _collisionTarget = null; } + else if (NODE is Tchotchke) + { + Tchotchke tchotchke = (Tchotchke)NODE; + tchotchke.FireActions(Trigger.On.Collision, this); + } } } diff --git a/Gameplay/action.tscn b/Gameplay/action.tscn new file mode 100644 index 0000000..c334a5d --- /dev/null +++ b/Gameplay/action.tscn @@ -0,0 +1,3 @@ +[gd_scene load_steps=0 format=3 uid="uid://becqya8l8feni"] + +[node name="ProcessEffect" type="Node"] diff --git a/Gameplay/condition.tscn b/Gameplay/condition.tscn new file mode 100644 index 0000000..e644137 --- /dev/null +++ b/Gameplay/condition.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=3 uid="uid://dsrjrwd1eyeu3"] + +[ext_resource type="Script" uid="uid://vj2qucjwah5y" path="res://Gameplay/Condition.cs" id="1_s3ntn"] + +[node name="Condition" type="Node"] +script = ExtResource("1_s3ntn") diff --git a/Gameplay/effect.tscn b/Gameplay/effect.tscn index fa3a0f9..1fff1b6 100644 --- a/Gameplay/effect.tscn +++ b/Gameplay/effect.tscn @@ -1,3 +1,3 @@ -[gd_scene format=3 uid="uid://becqya8l8feni"] +[gd_scene format=3 uid="uid://dti20yu8jfujq"] -[node name="ProcessEffect" type="Node"] +[node name="Action" type="Node"] diff --git a/Gameplay/tchotchke.tscn b/Gameplay/tchotchke.tscn index 53a7a3d..60b2d95 100644 --- a/Gameplay/tchotchke.tscn +++ b/Gameplay/tchotchke.tscn @@ -30,7 +30,3 @@ gravity = 5.0 [node name="CollisionShape2D" type="CollisionShape2D" parent="Gravity"] shape = SubResource("CircleShape2D_d82wc") - -[connection signal="mouse_entered" from="." to="." method="OnMouseEntered"] -[connection signal="mouse_exited" from="." to="." method="OnMouseExited"] -[connection signal="body_entered" from="Gravity" to="." method="OnBodyEntered"] diff --git a/Gameplay/trigger.tscn b/Gameplay/trigger.tscn new file mode 100644 index 0000000..a95b7ac --- /dev/null +++ b/Gameplay/trigger.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=3 uid="uid://dufkmbuxx2h41"] + +[ext_resource type="Script" uid="uid://g0mmh73fptyg" path="res://Gameplay/Trigger.cs" id="1_opbo1"] + +[node name="Trigger" type="Node"] +script = ExtResource("1_opbo1")