/// <summary> /// 开始动画 /// </summary> public void AnimalionRender() { if (IsPrepareAnimalion) { if (AnimalInterface != null) { AnimalInterface.PrepareAnimalion(); IsEndAnimalion = false; IsPrepareAnimalion = false; } } //开始动画 if (AnimalInterface != null) { AnimalInterface.StartAnimalion(); } //Console.WriteLine("动画中Animaling" + index); index++; AnimalionUsedTimeMilliseconds = index * DelayTime * 1.0f; AnimalionUsedTime = AnimalionUsedTimeMilliseconds / 1000; if (AnimalionUsedTime >= AnimalionTime) { IsPrepareAnimaled = false; IsPrepareAnimalion = true; index = 0; //动画结束 if (AnimalInterface != null) { AnimalInterface.EndAnimation(); IsEndAnimalion = true; AnimalionUsedTime = AnimalionTime; } } }
public void stopAnimalion() { IsPrepareAnimaled = false; IsPrepareAnimalion = true; index = 0; //动画结束 if (AnimalInterface != null) { AnimalInterface.EndAnimation(); IsEndAnimalion = true; AnimalionUsedTime = AnimalionTime; } }