upgrade to .NET 8

wip-inventory
HumanoidSandvichDispenser 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 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>("InteractionTrigger");
_light = GetNode<PointLight2D>("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<Utils.World>().SetSpawn(GlobalPosition);
world.DialogueBalloon.Start(DialogueResource, "start");
//DialogueManager.ShowExampleDialogueBalloon(DialogueResource, "start");
};
}

View File

@ -1,6 +1,6 @@
<Project Sdk="Godot.NET.Sdk/4.2.1">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<EnableDynamicLoading>true</EnableDynamicLoading>
</PropertyGroup>
<ItemGroup>
@ -9,4 +9,4 @@
<None Remove="UnitTests/**/*" />
<PackageReference Include="Firebelley.GodotUtilities" Version="4.0.4" />
</ItemGroup>
</Project>
</Project>