Add chariot, fix water room doors, add item picked up message
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user