You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
741 B
24 lines
741 B
using System;
|
|
using UnityEngine;
|
|
using UnityEngine.VFX;
|
|
|
|
namespace UnityEngine.VFX
|
|
{
|
|
class SetSpawnTime : VFXSpawnerCallbacks
|
|
{
|
|
private static readonly int spawnTimeID = Shader.PropertyToID("spawnTime");
|
|
|
|
public sealed override void OnPlay(VFXSpawnerState state, VFXExpressionValues vfxValues, VisualEffect vfxComponent)
|
|
{
|
|
}
|
|
|
|
public sealed override void OnUpdate(VFXSpawnerState state, VFXExpressionValues vfxValues, VisualEffect vfxComponent)
|
|
{
|
|
state.vfxEventAttribute.SetFloat(spawnTimeID, state.totalTime);
|
|
}
|
|
|
|
public sealed override void OnStop(VFXSpawnerState state, VFXExpressionValues vfxValues, VisualEffect vfxComponent)
|
|
{
|
|
}
|
|
}
|
|
}
|