Hallucination system
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unheimlich.Features.Hallucination
|
||||
{
|
||||
/// <summary>
|
||||
/// ScriptableObject describing a discrete hallucination event.
|
||||
/// Configure in the inspector and pass to HallucinationManager.TriggerHallucinationEvent().
|
||||
/// </summary>
|
||||
[CreateAssetMenu(fileName = "HallucinationEvent", menuName = "Unheimlich/Hallucination/Hallucination Event")]
|
||||
public class HallucinationEvent : ScriptableObject
|
||||
{
|
||||
[Header("Identity")]
|
||||
[Tooltip("Human-readable label for this event (used in logs and the inspector)")]
|
||||
[SerializeField] private string _label;
|
||||
|
||||
[Header("Ghost Word")]
|
||||
[Tooltip("Spawn a ghost word that moves toward the player")]
|
||||
[SerializeField] private bool _spawnGhostWord;
|
||||
|
||||
[Tooltip("Text displayed by the ghost word")]
|
||||
[SerializeField] private string _ghostWordText;
|
||||
|
||||
[Tooltip("World-space spawn position offset from the anchor point")]
|
||||
[SerializeField] private Vector3 _ghostWordSpawnOffset = new Vector3(0f, 1.5f, 2f);
|
||||
|
||||
[Tooltip("Duration before the ghost word disappears (seconds)")]
|
||||
[SerializeField] private float _ghostWordLifetime = 3f;
|
||||
|
||||
[Header("Sanity Cost")]
|
||||
[Tooltip("Sanity added to the player when this event fires (0 = no change)")]
|
||||
[SerializeField, Range(0f, 1f)] private float _sanityCost = 0f;
|
||||
|
||||
// ─── Public Accessors ──────────────────────────────────────────────────────
|
||||
|
||||
public string Label => _label;
|
||||
public bool SpawnGhostWord => _spawnGhostWord;
|
||||
public string GhostWordText => _ghostWordText;
|
||||
public Vector3 GhostWordSpawnOffset => _ghostWordSpawnOffset;
|
||||
public float GhostWordLifetime => _ghostWordLifetime;
|
||||
public float SanityCost => _sanityCost;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b4c627a455825134087ba8c6f8931aed
|
||||
Reference in New Issue
Block a user