29 lines
1.1 KiB
C#
29 lines
1.1 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.Localization;
|
|
using UnityEngine.Localization.Settings;
|
|
|
|
namespace TRInventoryUpdatable
|
|
{
|
|
public class PocketWatchInventoryItem : MonoBehaviour, InventoryUpdatable, IUsable
|
|
{
|
|
public LocalizedString pocketWatchName;
|
|
public LocalizedString pocketWatchDescription;
|
|
|
|
public void InventoryUpdate()
|
|
{
|
|
string localizedTextName = LocalizationSettings.StringDatabase.GetLocalizedString("GameMenu", "pocketWatch");
|
|
string localizedTextDescription = LocalizationSettings.StringDatabase.GetLocalizedString("GameMenu", "oldPocketWatch");
|
|
InventoryManager.GetInstance().ringInventoryGear.itemName.text = localizedTextName;
|
|
InventoryManager.GetInstance().ringInventoryGear.itemDescription.text = localizedTextDescription;
|
|
}
|
|
|
|
public void Use()
|
|
{
|
|
ClockController.GetInstance().OpenPocketWatch();
|
|
InventoryManager.GetInstance().CloseInventory();
|
|
}
|
|
}
|
|
}
|