feat: Wind shader

This commit is contained in:
Gerard Gascón 2024-04-16 16:29:10 +02:00
parent dd9640fc39
commit 63d0524d3c
13 changed files with 318 additions and 4 deletions

View file

@ -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>();

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c1366d1a4dc80074e845d880fc05603e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View 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));
}
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a664b406e50e2054bb5d9dd2415d208a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: