feat: Wind shader
This commit is contained in:
parent
dd9640fc39
commit
63d0524d3c
13 changed files with 318 additions and 4 deletions
14
Assets/Scripts/View/Scene/GardenFlower.cs
Normal file
14
Assets/Scripts/View/Scene/GardenFlower.cs
Normal file
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
namespace View.Scene {
|
||||
public class GardenFlower : MonoBehaviour {
|
||||
[SerializeField] private SpriteRenderer sprite;
|
||||
private static readonly int WindOffset = Shader.PropertyToID("_WindOffset");
|
||||
|
||||
private void Awake() {
|
||||
sprite.material.SetFloat(WindOffset, Random.Range(0f, 2f * Mathf.PI));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue