ProjectORK_Framework/Assets/Tutorial Assets/Terrain/WaterMaterialMover.cs
2026-01-02 15:57:41 +03:00

20 lines
411 B
C#
Executable file

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class WaterMaterialMover : MonoBehaviour
{
public Vector2 scrollSpeed = new Vector2(0.5f, 0);
protected Renderer rend;
protected virtual void Start()
{
rend = GetComponent<Renderer>();
}
protected virtual void Update()
{
rend.material.mainTextureOffset = this.scrollSpeed * Time.time;
}
}