projectEli/Assets/Inventory System/ICWM Assets/Inventory/Scripts/Helper/Titles.cs

65 lines
1.8 KiB
C#
Raw Normal View History

2022-10-08 02:26:09 +00:00
//********************************************************//
// //
// Copyright © All rights reserved. MyNameIsVoo. 2020. //
// //
// REPRODUCTION FORBIDEN //
// //
//********************************************************//
using UnityEngine;
using UnityEngine.UI;
namespace ICWM
{
namespace HelperSystem
{
public class Titles : MonoBehaviour
{
public Text LootText;
public string LootName;
public Text StoreText;
public string StoreName;
public Text EnemyText;
public string EnemyName;
public static Titles instance;
private void Start()
{
instance = this;
}
#region PUBLIC
public void UpdateAreaText(string t_loot = null, string t_store = null, string t_enemy = null)
{
if (LootText != null)
{
if (t_loot == null)
LootText.text = LootName;
else
LootText.text = t_loot;
}
if (StoreText != null)
{
if (t_store == null)
StoreText.text = StoreName;
else
StoreText.text = t_store;
}
if (EnemyText != null)
{
if (t_enemy == null)
EnemyText.text = EnemyName;
else
EnemyText.text = t_enemy;
}
}
#endregion
}
}
}