Skip to content

Instantly share code, notes, and snippets.

View tk009999's full-sized avatar
🇹🇼

AceLee tk009999

🇹🇼
View GitHub Profile
@tk009999
tk009999 / GetWaveCrest.cs
Created September 15, 2020 09:06
#Unity3D
public static class ExtensionTools
{
private static void ScanPeak(float[] arr, int length, float[] pvlst)
{
for (int i = 1; i < length - 1; i++)
{
if ((arr[i] < arr[i - 1]) && (arr[i] < arr[i + 1]))
{
pvlst[i] = -1;
}
using UnityEngine;
public class DontDestroyOnLoadController<T> : MonoBehaviour where T : MonoBehaviour
{
public static T Instance;
private object _lock = new object();
protected virtual void Awake()
{