using System.Collections; using System.Collections.Generic; using UnityEngine; namespace Rigging.Data { using System; [Serializable] public class IntString { public int theInt; public string theString; } public class AnimationHandler : RiggingDataBase { /* 0 Stand 1 Run 2 Sprint 3 Jump */ public IntString[] animationStates; public int animationState; // 当前角色的动作 public void ChangeAnimationState(byte newState) { animationState = newState; } } [Serializable] public class AnimationParam { private Player player; [SerializeField] public T[] values; public AnimationParam() { } public void SetPlayer(Player p) { player = p; } public T CurrentValue() { return values[Mathf.Clamp(player.status.animation.animationState, 0, values.Length - 1)]; } public T current { get { return values[Mathf.Clamp(player.status.animation.animationState, 0, values.Length - 1)]; } } } }