22 lines
705 B
C#
22 lines
705 B
C#
using UnityEngine;
|
|
|
|
public class TargetPointData : MonoBehaviour
|
|
{
|
|
public WaveformType waveformType = WaveformType.Sine; // 正常波形类型
|
|
public bool isCorrect = true; // 是否为正确模块
|
|
//public WaveformType errorWaveformType = WaveformType.Spike; // 错误波形类型(如果有错误)
|
|
[HideInInspector]
|
|
public int randomShift;
|
|
[HideInInspector]
|
|
public float initialRandomPhase; // 随机初始相位
|
|
[HideInInspector]
|
|
public int spikeIndex=-1;
|
|
|
|
void Start()
|
|
{
|
|
randomShift = Random.Range(4, 8);
|
|
initialRandomPhase = randomShift*Mathf.PI * 3f*0.1f; // 随机初始相位
|
|
}
|
|
}
|
|
|