Skip to content

Instantly share code, notes, and snippets.

View WillYuum's full-sized avatar
💭
Doing yummy things

WillYum WillYuum

💭
Doing yummy things
View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
public enum KeyEventType
{
OnKeyDown = 0,
OnKeyHold = 1,
OnKeyUp = 2,
using UnityEngine;
public class BeatDetector : MonoBehaviour
{
public AudioSource audioSource;
public float beatThreshold = 0.2f;
private float[] samples;
private float previousVolume;