Overworld Work, NPC Shaded, Unused Files Placed in New Folder

This commit is contained in:
Pal
2025-09-12 15:03:12 -07:00
parent b04956ea4d
commit 28380d398c
31 changed files with 67 additions and 223 deletions

View File

@@ -20,53 +20,53 @@ public partial class Npc : Node3D
public void OnReady()
{
SetPhysicsProcess(true);
DialogueZone.BodyEntered += DialogueZone_BodyEntered;
DialogueZone.BodyExited += DialogueZone_BodyExited;
Hitbox.AreaEntered += Hitbox_AreaEntered;
SetPhysicsProcess(true);
DialogueZone.BodyEntered += DialogueZone_BodyEntered;
DialogueZone.BodyExited += DialogueZone_BodyExited;
Hitbox.AreaEntered += Hitbox_AreaEntered;
}
private void Hitbox_AreaEntered(Area3D area)
{
if (area.GetOwner() is ThrownItem thrownItem)
{
DialogueController.ShowDialogue(Dialogue, "get_item");
thrownItem.QueueFree();
}
else
{
DialogueController.ShowDialogue(Dialogue, "hit");
}
if (area.GetOwner() is ThrownItem thrownItem)
{
DialogueController.ShowDialogue(Dialogue, "get_item");
thrownItem.QueueFree();
}
else
{
DialogueController.ShowDialogue(Dialogue, "hit");
}
}
private void Hitbox_BodyEntered(Node body)
{
DialogueController.ShowDialogue(Dialogue, "hit");
DialogueController.ShowDialogue(Dialogue, "hit");
}
private void DialogueZone_BodyExited(Node3D body)
{
_isInDialogueZone = false;
DialogueController.Interrupt();
_isInDialogueZone = false;
DialogueController.Interrupt();
}
private void DialogueZone_BodyEntered(Node3D body)
{
_isInDialogueZone = true;
_isInDialogueZone = true;
}
public override void _UnhandledInput(InputEvent @event)
{
if (@event.IsActionPressed(GameInputs.Interact) && _isInDialogueZone)
{
if (_isIntroductionComplete)
DialogueController.ShowDialogue(Dialogue, "general");
else
{
DialogueController.ShowDialogue(Dialogue, "introduction");
_isIntroductionComplete = true;
}
}
if (@event.IsActionPressed(GameInputs.Interact) && _isInDialogueZone)
{
if (_isIntroductionComplete)
DialogueController.ShowDialogue(Dialogue, "general");
else
{
DialogueController.ShowDialogue(Dialogue, "introduction");
_isIntroductionComplete = true;
}
}
}
}