blob: f59f4c25919ee9bec03c39c07bd00a683051e4b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
using UnityEngine;
public class PerlinWordScale : MonoBehaviour
{
public float scale = 1f;
public float min = 0.5f;
public float max = 2f;
private void Start()
{
float t = Mathf.PerlinNoise(base.transform.position.x * scale, base.transform.position.y * scale);
base.transform.localScale *= Mathf.Lerp(min, max, t);
}
}
|