using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CharBaby : CharBase {
	public AudioClip sndCry;

	int curr = 0;

	void Cry() {
		if(!ent.seat)
			return;

		ent.HeadBump();
		ent.seat.grid.AddRipple(ent.seat.x, ent.seat.z, 5, this)
			.instigatorSound = sndCry;
		Game.instance.ui.Play(sndCry);
	}

	public override void OnRippleTouch(AutomataState state) {
		//if(state.instigator != this) {
		//	Cry();
		//	curr = 0;
		//}
	}

	protected override void OnBeatAction(int absBeat, Entity ent) {
		if(curr < 4) {
			Cry();
		}
		curr++;
		if(curr >= 8)
			curr = 0;
	}

}
