blob: 47aa639c72a46d22c45a5692db7741ccfb599475 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class WaitForActionReachEnd : IEnumerator
{
UnitAnimation m_UnitAnimation;
UnitAnimation.ELayer m_Layer;
public WaitForActionReachEnd(UnitAnimation unitAnim, UnitAnimation.ELayer layer = UnitAnimation.ELayer.Basic)
{
m_UnitAnimation = unitAnim;
m_Layer = layer;
}
public object Current => null;
public bool MoveNext()
{
var stateInfo = m_UnitAnimation.layers[(int)m_Layer].stateInfo;
float normalTime = stateInfo.normalizedTime;
return normalTime < 1f;
}
public void Reset()
{
}
}
|