using System.Collections; using System.Collections.Generic; using UnityEngine; public class HardwareControl : MonoBehaviour { Animator animator; [HideInInspector] [Range(0, 1f)] public float length = 0f; [HideInInspector] public bool lianjie; [HideInInspector] public string animName; private void Start() { animator = GetComponent(); } public void Move() { animator?.Play(animName.Equals("Null") ? "Null" : animName, -1, length/*Mathf.Clamp(length,0,0.99f)*/); } }