MiniGame-PushPush/Assets/Epic Toon FX/Scripts/ETFXPitchRandomizer.cs

17 lines
306 B
C#
Raw Permalink Normal View History

2023-10-04 20:20:04 +09:00
using UnityEngine;
using System.Collections;
namespace EpicToonFX
{
public class ETFXPitchRandomizer : MonoBehaviour
{
public float randomPercent = 10;
void Start ()
{
transform.GetComponent<AudioSource>().pitch *= 1 + Random.Range(-randomPercent / 100, randomPercent / 100);
}
}
}