Hi everyone…
Problem with animation is that I have assigned following script with coin object, when “player” collide with coin all coin objects animate. I could not find a way too solve this problem…,
using UnityEngine;
using System.Collections;
public class Money : MonoBehaviour {
public Animator anim;
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnTriggerEnter(Collider collider)
{
if(collider.gameObject.tag=="Player")
{
GolemScript.score+=1;
anim.SetBool("Flip",true);
yield WaitForSeconds=0.5;
Destroy(this.gameObject);
}
else
{
anim.SetBool("Flip",false);
}
}
}