Ejemplo n.º 1
0
        public void SetInState(int layerIndex, int fullPathHash, int behaviourHash)
        {
            AnimClipStateInfo info = mCurrentAnimState.GetValueSafe(layerIndex);

            if (info != null && info.fullPathHash == fullPathHash)
            {
                info.currentStateBehaviors.AddIfUnRepeat(behaviourHash);
            }
            else
            {
                mCurrentAnimState.Set(layerIndex, new AnimClipStateInfo(fullPathHash, behaviourHash));
            }
        }
Ejemplo n.º 2
0
        public bool IsInState(int layerIndex, int fullPathHash, int behaviourHash)
        {
            AnimClipStateInfo info = mCurrentAnimState.GetValueSafe(layerIndex);

            return(info != null && info.fullPathHash == fullPathHash && info.currentStateBehaviors.Contains(behaviourHash));
        }