how to call the same animation 2 times in update function when using time method
var min : int;
var sec : int;
var fraction : int;
var timecount : float;
var starttime : float;
var timeCounter : GUIText;
function Start ()
{
starttime = Time.time;
}
function Update () {
timecount = Time.time - starttime;
min = (timecount/60f);
sec = (timecount % 60f);
fraction = ((timecount * 10) %10);
timeCounter.text = String.Format("{00:00}:{1:00}:{2:00}",min,sec,fraction);
if(sec<=3)
{
animation.Play("Take 001");
Debug.Log("wow");
}
if(sec>4&sec<10)
{
animation.Play("WaggingTail");
Debug.Log("et");
}
if(sec>=11&sec<12)
{
animation.Play("Sad");
Debug.Log("wa");
}
if(sec>=13&sec<24)
{
animation.Play("Barking");
Debug.Log("bang");
}
if(sec>25&sec<33)
{
animation.CrossFade("Growling");
Debug.Log("bang");
}
if(sec>34&sec<36)
{
animation.CrossFade("Take 001");
Debug.Log("bang");
}
if(sec>37&sec<44)
{
animation.CrossFadeQueued("Barking");
Debug.Log("bang");
}
}
when i calling the barking for second time its not working.why?
http://forum.unity3d.com/threads/44441-XML-Reading-a-XML-file-in-Unity-How-to-do-it