Первый коммит с LFS.
This commit is contained in:
1 parent
4fcb1e2f24
commit
179816dc4b
5084 files changed
+3714098
-1
No files matched your search
@@ -0,0 +1,36 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Quest_Environment.Q4
|
||||
{
|
||||
[RequireComponent(typeof(Outline))]
|
||||
public class MovableFurniture : MonoBehaviour, IInteractable
|
||||
{
|
||||
[Tooltip("A unique ID for this piece of furniture (e.g., 'Chair', 'Lamp').")]
|
||||
[SerializeField] private string furnitureId;
|
||||
|
||||
public void Interact()
|
||||
{
|
||||
// Проверяем, что сейчас идет квест с мебелью, прежде чем что-то делать
|
||||
if (QuestManager.Instance?.currentQuest is Q4_PlaceFurnitureQuest)
|
||||
{
|
||||
InteractionHandler.Instance.NotifyInteraction(gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
public string GetDescription()
|
||||
{
|
||||
// Описание будет только если активен квест по расстановке мебели
|
||||
if (QuestManager.Instance?.currentQuest is Q4_PlaceFurnitureQuest furnitureQuest)
|
||||
{
|
||||
// И если игрок ничего не "держит" в руках
|
||||
if (furnitureQuest.HeldFurnitureId == null)
|
||||
{
|
||||
return $"Подобрать {furnitureId}";
|
||||
}
|
||||
}
|
||||
|
||||
// В противном случае возвращаем пустую строку, и подсветки не будет
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user