You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
815 B
C#
36 lines
815 B
C#
/******************************************************************************/
|
|
/*
|
|
Project - MudBun
|
|
Publisher - Long Bunny Labs
|
|
http://LongBunnyLabs.com
|
|
Author - Ming-Lun "Allen" Chou
|
|
http://AllenChou.net
|
|
*/
|
|
/******************************************************************************/
|
|
|
|
using UnityEngine;
|
|
|
|
namespace MudBun
|
|
{
|
|
public class MudNoiseScroller : MonoBehaviour
|
|
{
|
|
public Vector3 Speed = Vector3.zero;
|
|
|
|
private void Update()
|
|
{
|
|
var noise = GetComponent<MudNoiseVolume>();
|
|
if (noise != null)
|
|
{
|
|
noise.Offset += Speed * Time.deltaTime;
|
|
}
|
|
|
|
var curveSimple = GetComponent<MudCurveSimple>();
|
|
if (curveSimple != null)
|
|
{
|
|
curveSimple.NoiseOffset += Speed.x * Time.deltaTime;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|