summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Unit/UnitRootMotion.cs
blob: 0d9d04a6a813411cd6fe1480393f04785c6e57e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

// 同步root motion到角色根节点
[DisallowMultipleComponent]
public class UnitRootMotion : MonoBehaviour
{
    Transform m_Root;
    Animator m_Animator;

    private void Awake()
    {
        m_Root = transform.parent;
        m_Animator = GetComponent<Animator>();
    }

}