added "finish" button to dialogue UI, implementation of many, many trinket's effects, autot-argetting fix on death, added script for particles/player following

This commit is contained in:
2025-12-19 11:39:39 +01:00
parent 56f7fb4aaa
commit f624eeeeb6
14 changed files with 3062 additions and 1774 deletions

View File

@@ -0,0 +1,44 @@
using UnityEngine;
namespace Beyond
{
public class ParticlesPlayerFollower : MonoBehaviour
{
[Header("Position Settings")]
[Tooltip("How high above the player the rain cloud sits.")]
public float heightOffset = 15f;
[Tooltip("Smooths the movement so rain doesn't snap instantly.")]
public bool useSmoothing = false;
public float smoothSpeed = 10f;
private void Start()
{
// Auto-find Invector player if not assigned
if (Player.Instance == null)
{
Debug.LogWarning("ParticlesPlayerFollower: No Player found! Make sure Player.Instance is set.");
enabled = false;
return;
}
}
void LateUpdate()
{
if (Player.Instance == null) return;
var target = Player.Instance.transform;
// Calculate where the rain emitter should be
// We take the player's X and Z, but override the Y with our offset
Vector3 targetPosition = new Vector3(target.position.x, target.position.y + heightOffset, target.position.z);
if (useSmoothing)
{
transform.position = Vector3.Lerp(transform.position, targetPosition, Time.deltaTime * smoothSpeed);
}
else
{
transform.position = targetPosition;
}
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 0e008257ca9c7464d8f9b914b5b218b6