From c1fcfcd3987ac22514dd3a4ab687b0770935ad5a Mon Sep 17 00:00:00 2001 From: HumanoidSandvichDispenser Date: Fri, 29 Dec 2023 15:37:52 -0800 Subject: [PATCH] upgrade to .NET 8 --- Entities/Campfire.cs | 15 +++++++++++---- SupaLidlGame.csproj | 4 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Entities/Campfire.cs b/Entities/Campfire.cs index 787e5e9..2869521 100644 --- a/Entities/Campfire.cs +++ b/Entities/Campfire.cs @@ -2,6 +2,7 @@ using Godot; using GodotUtilities; using SupaLidlGame.BoundingBoxes; using SupaLidlGame.Extensions; +using GodotUtilities.SourceGenerators; using DialogueManagerRuntime; namespace SupaLidlGame.Entities; @@ -9,8 +10,10 @@ namespace SupaLidlGame.Entities; [Scene] public partial class Campfire : StaticBody2D, Utils.IInteractive { + [Node("PointLight2D")] private PointLight2D _light; + [Node("InteractionTrigger")] public InteractionTrigger InteractionTrigger { get; set; } [Signal] @@ -19,11 +22,16 @@ public partial class Campfire : StaticBody2D, Utils.IInteractive [Export(PropertyHint.File, "*.dialogue")] public Resource DialogueResource { get; set; } + public override void _Notification(int what) + { + if (what == NotificationSceneInstantiated) + { + WireNodes(); + } + } + public override void _Ready() { - InteractionTrigger = GetNode("InteractionTrigger"); - _light = GetNode("PointLight2D"); - InteractionTrigger.Interaction += () => { // save the player's spawn position to be their position on interaction @@ -36,7 +44,6 @@ public partial class Campfire : StaticBody2D, Utils.IInteractive //this.GetAncestor().SetSpawn(GlobalPosition); world.DialogueBalloon.Start(DialogueResource, "start"); - //DialogueManager.ShowExampleDialogueBalloon(DialogueResource, "start"); }; } diff --git a/SupaLidlGame.csproj b/SupaLidlGame.csproj index 909e3a6..2fe2c94 100644 --- a/SupaLidlGame.csproj +++ b/SupaLidlGame.csproj @@ -1,6 +1,6 @@ - net6.0 + net8.0 true @@ -9,4 +9,4 @@ - \ No newline at end of file +