upgrade to .NET 8

wip-inventory
John Montagu, the 4th Earl of Sandvich 2023-12-29 15:37:52 -08:00
parent c604e91021
commit c1fcfcd398
Signed by: sandvich
GPG Key ID: 9A39BE37E602B22D
2 changed files with 13 additions and 6 deletions

View File

@ -2,6 +2,7 @@ using Godot;
using GodotUtilities; using GodotUtilities;
using SupaLidlGame.BoundingBoxes; using SupaLidlGame.BoundingBoxes;
using SupaLidlGame.Extensions; using SupaLidlGame.Extensions;
using GodotUtilities.SourceGenerators;
using DialogueManagerRuntime; using DialogueManagerRuntime;
namespace SupaLidlGame.Entities; namespace SupaLidlGame.Entities;
@ -9,8 +10,10 @@ namespace SupaLidlGame.Entities;
[Scene] [Scene]
public partial class Campfire : StaticBody2D, Utils.IInteractive public partial class Campfire : StaticBody2D, Utils.IInteractive
{ {
[Node("PointLight2D")]
private PointLight2D _light; private PointLight2D _light;
[Node("InteractionTrigger")]
public InteractionTrigger InteractionTrigger { get; set; } public InteractionTrigger InteractionTrigger { get; set; }
[Signal] [Signal]
@ -19,11 +22,16 @@ public partial class Campfire : StaticBody2D, Utils.IInteractive
[Export(PropertyHint.File, "*.dialogue")] [Export(PropertyHint.File, "*.dialogue")]
public Resource DialogueResource { get; set; } public Resource DialogueResource { get; set; }
public override void _Notification(int what)
{
if (what == NotificationSceneInstantiated)
{
WireNodes();
}
}
public override void _Ready() public override void _Ready()
{ {
InteractionTrigger = GetNode<InteractionTrigger>("InteractionTrigger");
_light = GetNode<PointLight2D>("PointLight2D");
InteractionTrigger.Interaction += () => InteractionTrigger.Interaction += () =>
{ {
// save the player's spawn position to be their position on 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<Utils.World>().SetSpawn(GlobalPosition); //this.GetAncestor<Utils.World>().SetSpawn(GlobalPosition);
world.DialogueBalloon.Start(DialogueResource, "start"); world.DialogueBalloon.Start(DialogueResource, "start");
//DialogueManager.ShowExampleDialogueBalloon(DialogueResource, "start");
}; };
} }

View File

@ -1,6 +1,6 @@
<Project Sdk="Godot.NET.Sdk/4.2.1"> <Project Sdk="Godot.NET.Sdk/4.2.1">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<EnableDynamicLoading>true</EnableDynamicLoading> <EnableDynamicLoading>true</EnableDynamicLoading>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>