Dialogue system; ask user if they want to teleport to next floor

This commit is contained in:
2024-09-08 23:04:27 -07:00
parent 1dfc61f003
commit 07295da93c
61 changed files with 3002 additions and 85 deletions

View File

@@ -2,7 +2,6 @@
using Chickensoft.Collections;
using Chickensoft.GodotNodeInterfaces;
using Chickensoft.Introspection;
using Chickensoft.LogicBlocks;
using Chickensoft.SaveFileBuilder;
using Godot;
@@ -148,6 +147,13 @@ namespace GameJamDungeon
SetPhysicsProcess(true);
}
public override void _UnhandledInput(InputEvent @event)
{
var attackIsPressed = Input.IsActionJustPressed(GameInputs.Attack);
if (attackIsPressed && !GameRepo.IsWithinDialogueSpace)
PlayerLogic.Input(new PlayerLogic.Input.Attack());
}
private void OnEnemyHitBoxEntered(Area3D area)
{
if (area is IHitbox hitBox)
@@ -172,10 +178,6 @@ namespace GameJamDungeon
{
PlayerLogic.Input(new PlayerLogic.Input.PhysicsTick(delta));
var attackIsPressed = Input.IsActionJustPressed(GameInputs.Attack);
if (attackIsPressed && !GameRepo.IsWithinDialogueSpace)
PlayerLogic.Input(new PlayerLogic.Input.Attack());
MoveAndSlide();
PlayerLogic.Input(new PlayerLogic.Input.Moved(GlobalPosition));
@@ -196,7 +198,7 @@ namespace GameJamDungeon
public void ThrowItem()
{
var itemScene = GD.Load<PackedScene>("res://src/items/throwable/ThrowableItem.tscn");
var throwItem = itemScene.Instantiate<IThrowableItem>();
var throwItem = itemScene.Instantiate<ThrowableItem>();
GetTree().Root.AddChildEx(throwItem);
throwItem.GlobalPosition = GameRepo.PlayerGlobalPosition.Value;
throwItem.GlobalRotation = GlobalRotation;
@@ -224,7 +226,10 @@ namespace GameJamDungeon
HPBar.Value = newHP;
if (newHP <= 0.0)
{
PlayerLogic.Input(new PlayerLogic.Input.Killed());
HealthTimer.Stop();
}
}
private void OnVTChanged(int newVT)

View File

@@ -169,7 +169,8 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.163955, 1.13605, -0.159032)
cull_mask = 1048573
[node name="OmniLight3D" type="OmniLight3D" parent="."]
omni_range = 73.156
light_energy = 4.183
omni_range = 83.659
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
unique_name_in_owner = true