修改水

This commit is contained in:
2026-01-01 22:00:33 +08:00
parent 040a222bd6
commit 9ceffccd39
1800 changed files with 103929 additions and 139495 deletions

View File

@@ -1,32 +0,0 @@
using UnityEngine;
using Obi;
namespace Obi.Samples
{
[RequireComponent(typeof(ObiActor))]
public class ActorBlinker : MonoBehaviour
{
public Color neutralColor = Color.white;
public Color highlightColor = Color.red;
private ObiActor actor;
void Awake()
{
actor = GetComponent<ObiActor>();
}
public void Blink(int particleIndex)
{
if (actor.solver != null)
actor.solver.colors[particleIndex] = highlightColor;
}
void LateUpdate()
{
if (actor.solver != null)
for (int i = 0; i < actor.activeParticleCount; ++i)
actor.solver.colors[actor.solverIndices[i]] += (neutralColor - actor.solver.colors[actor.solverIndices[i]]) * Time.deltaTime * 5;
}
}
}