upgrade to .NET 8
parent
c604e91021
commit
c1fcfcd398
|
@ -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");
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue