Add ability to hit NPCs and see different dialogue, add interrupt feature for dialogue controller singleton
This commit is contained in:
@@ -12,26 +12,10 @@ public partial class Overworld : Node3D, IDungeonFloor
|
||||
[Dependency]
|
||||
public IGameRepo GameRepo => this.DependOn<IGameRepo>();
|
||||
|
||||
[Node] public Area3D NPCBox { get; set; } = default!;
|
||||
|
||||
[Node] public Marker3D PlayerSpawnPoint { get; set; } = default!;
|
||||
|
||||
[Export] public Resource Dialogue { get; set; }
|
||||
|
||||
public void InitializeDungeon()
|
||||
{
|
||||
NPCBox.AreaEntered += NPCBox_AreaEntered;
|
||||
NPCBox.AreaExited += NPCBox_AreaExited;
|
||||
GameRepo.SetPlayerGlobalPosition(PlayerSpawnPoint.GlobalPosition);
|
||||
}
|
||||
|
||||
private void NPCBox_AreaExited(Area3D area)
|
||||
{
|
||||
GameRepo.IsWithinDialogueSpace = false;
|
||||
}
|
||||
|
||||
private void NPCBox_AreaEntered(Area3D area)
|
||||
{
|
||||
GameRepo.IsWithinDialogueSpace = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user