ripple
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using Lean.Pool;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
||||
{
|
||||
public class DTM_Ripple : MonoBehaviour, IPoolable
|
||||
{
|
||||
public ParticleSystem mainRipple;
|
||||
public ParticleSystem inRipple;
|
||||
public ParticleSystem outRipple;
|
||||
|
||||
private Renderer inRippleRenderer;
|
||||
private Renderer outRippleRenderer;
|
||||
|
||||
public void OnSpawn()
|
||||
{
|
||||
inRippleRenderer = inRipple.GetComponent<Renderer>();
|
||||
outRippleRenderer = outRipple.GetComponent<Renderer>();
|
||||
}
|
||||
|
||||
public void OnDespawn()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void SetRippleTime(float time)
|
||||
{
|
||||
ParticleSystem.MainModule inRippleMain = inRipple.main;
|
||||
ParticleSystem.MainModule outRippleMain = outRipple.main;
|
||||
inRippleMain.startLifetime = time;
|
||||
outRippleMain.startLifetime = time;
|
||||
}
|
||||
|
||||
public void SetEmissionColor(Color color)
|
||||
{
|
||||
inRippleRenderer.material.SetColor("_MainColor", color);
|
||||
outRippleRenderer.material.SetColor("_MainColor", color);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f7b6652747cbe0c448fb3fbc0f9beda3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user