53 lines
1.3 KiB
C#
53 lines
1.3 KiB
C#
using System;
|
|
using KINEMATION.MagicBlend.Runtime;
|
|
using RootMotion.FinalIK;
|
|
using UnityEngine;
|
|
|
|
namespace NBF
|
|
{
|
|
public class PlayerModelAsset : MonoBehaviour
|
|
{
|
|
public Animator Animator { get; private set; }
|
|
public PlayerIK IK { get; private set; }
|
|
public PlayerAnimator PlayerAnimator { get; private set; }
|
|
public MagicBlending MagicBlending { get; private set; }
|
|
|
|
public Transform NeckTransform;
|
|
public LookAtIK LookIk;
|
|
|
|
public PlayerArm LeftArm;
|
|
public PlayerArm RightArm;
|
|
|
|
public Transform Pinch;
|
|
|
|
public Transform RodRoot
|
|
{
|
|
get
|
|
{
|
|
if (RightArm == null)
|
|
{
|
|
return transform;
|
|
}
|
|
|
|
return RightArm.RodContainer;
|
|
}
|
|
}
|
|
// public Transform RodRoot;
|
|
|
|
|
|
private void Awake()
|
|
{
|
|
LookIk = GetComponent<LookAtIK>();
|
|
Animator = GetComponent<Animator>();
|
|
Animator.keepAnimatorStateOnDisable = true;
|
|
MagicBlending = GetComponent<MagicBlending>();
|
|
IK = GetComponent<PlayerIK>();
|
|
PlayerAnimator = GetComponent<PlayerAnimator>();
|
|
}
|
|
|
|
public void SetPlayer(Transform FppLook)
|
|
{
|
|
LookIk.solver.target = FppLook;
|
|
}
|
|
}
|
|
} |