Skip to content

Instantly share code, notes, and snippets.

@Madhotdog
Madhotdog / BeatCounter.cs
Created Apr 13, 2016
BeatCounter, a Unity script used to determine timing.
View BeatCounter.cs
using UnityEngine;
using System.Collections;
using System;
[RequireComponent(typeof(AudioSource))]
public class BeatCounter : MonoBehaviour {
public Action<int> BeatEvent = delegate { };
public Action BarEvent = delegate { };
public float bpm;
public int beatsPerBar;