Add chariot, fix water room doors, add item picked up message

This commit is contained in:
2024-09-23 18:33:46 -07:00
parent 68c7b30e57
commit a4c18e7cf6
556 changed files with 11172 additions and 886 deletions

View File

@@ -17,6 +17,8 @@ public interface IInGameUI : IControl
public void ShowInventoryFullMessage(string rejectedItemName);
public void ShowPickedUpItemMessage(string pickedUpItem);
event InGameUI.MinimapButtonReleasedEventHandler MinimapButtonReleased;
}
@@ -50,6 +52,11 @@ public partial class InGameUI : Control, IInGameUI
PlayerInfoUI.DisplayInventoryFullMessage(rejectedItemName);
}
public void ShowPickedUpItemMessage(string pickedUp)
{
PlayerInfoUI.DisplayPickedUpMessage(pickedUp);
}
public void HideInventoryScreen()
{
InventoryMenu.Hide();

View File

@@ -8,6 +8,8 @@ namespace GameJamDungeon;
public interface IPlayerInfoUI : IControl
{
public void DisplayInventoryFullMessage(string rejectedItemName);
public void DisplayPickedUpMessage(string pickedUpItem);
}
[Meta(typeof(IAutoNode))]
@@ -72,7 +74,18 @@ public partial class PlayerInfoUI : Control, IPlayerInfoUI
var newLabel = new Label() { Text = $"Could not pick up {rejectedItemName}.", LabelSettings = _labelSettings };
PlayerInfo.AddChild(newLabel);
GetTree().CreateTimer(5f).Timeout += () =>
GetTree().CreateTimer(3f).Timeout += () =>
{
PlayerInfo.RemoveChild(newLabel);
};
}
public async void DisplayPickedUpMessage(string pickedUpItem)
{
var newLabel = new Label() { Text = $"{pickedUpItem} picked up.", LabelSettings = _labelSettings };
PlayerInfo.AddChild(newLabel);
GetTree().CreateTimer(3f).Timeout += () =>
{
PlayerInfo.RemoveChild(newLabel);
};