feat: Wind shader
This commit is contained in:
parent
dd9640fc39
commit
63d0524d3c
13 changed files with 318 additions and 4 deletions
|
@ -11,7 +11,7 @@ namespace View {
|
|||
public CustomInput CustomInput { private set; get; }
|
||||
|
||||
private void Awake() {
|
||||
Model = new Model(20, 5);
|
||||
Model = new Model(1, 5);
|
||||
|
||||
IExpressionInput input = FindObjectOfType<ExpressionInput>();
|
||||
IExpressionInput visibility = FindObjectOfType<UIVisibility>();
|
||||
|
|
8
Assets/Scripts/View/Scene.meta
Normal file
8
Assets/Scripts/View/Scene.meta
Normal file
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c1366d1a4dc80074e845d880fc05603e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
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));
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Scripts/View/Scene/GardenFlower.cs.meta
Normal file
11
Assets/Scripts/View/Scene/GardenFlower.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a664b406e50e2054bb5d9dd2415d208a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue