27 lines
576 B
C#
27 lines
576 B
C#
using UnityEngine;
|
|
|
|
/// <summary>
|
|
/// Colleciton class for referencing and controlling HUD elements.
|
|
/// </summary>
|
|
public class HUD : MonoBehaviour
|
|
{
|
|
public BoostCapacityUI[] boostCapacities;
|
|
public JoinPrompt[] joinPrompts;
|
|
|
|
/// <summary>
|
|
/// Start a join prompt.
|
|
/// </summary>
|
|
/// <param name="player">Player to which the prompt belongs</param>
|
|
public void StartJoinPrompt(Player player)
|
|
{
|
|
foreach (JoinPrompt jp in joinPrompts)
|
|
{
|
|
if (jp.playerNumber == player.playerNumber)
|
|
{
|
|
jp.gameObject.SetActive(true);
|
|
jp.PromptInput(player);
|
|
}
|
|
}
|
|
}
|
|
}
|