﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//All Phonic stuff is in this namespace
using Arugula.Audio;

public class PhonicExample : MonoBehaviour
{
    //Use Attribute to enable easy context menu in Inspector
    [PhonicSound]
    public string footstep;


    //NOTE:  PhonicLoader script handles initializing Phonic in this example
    //Feel free to modify the defaults whenever
    void Update()
    {
        if (Input.GetKeyUp(KeyCode.Space))
        {
            Phonic.Play(footstep, Phonic.Position(transform.position), Phonic.Pitch(Random.Range(0.8f, 1.2f)));
        }
    }
}
