blob: 6f2252d787a6fc612a90ee6b60925aa8560a9eb6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ActionAnimCrossFade : ActionBase
{
Animator m_Animator;
int m_TargetAnimation;
float m_Duration;
public ActionAnimCrossFade(Animator animator, int toAnim, float duration = 0)
{
m_Animator = animator;
m_TargetAnimation = toAnim;
m_Duration = duration;
}
public override void Execute()
{
m_Animator.CrossFade(m_TargetAnimation, m_Duration);
}
}
|