using UnityEngine;
using System.Collections;

public class ChickenScript : ScenarioObject {
    public void OnTriggerEnter(Collider other) {
        AudioManager.Instance.Play("ChickenSqueek", 1f, false);
        StartCoroutine(OnCatch());
    }

    public void OnTriggerExit(Collider other) {
        StopAllCoroutines();
    }

    private IEnumerator OnCatch() {
        yield return new WaitForSeconds(2.0f);
        OnScenarioWin();
    }
}