Esempio n. 1
0
        public AnimHandle Play(string animId)
        {
            if (m_skeletonC == null)
            {
                // no skeleton
                return(AnimHandle.Invalid());
            }

            if (m_resource == null)
            {
                // no resource
                return(AnimHandle.Invalid());
            }

            foreach (var action in m_resource.Data.Value.Actions)
            {
                if (action.Name == animId)
                {
                    return(m_player.Play(action));
                }
            }

            // not found
            Debug.Fail("anim action not found : " + animId);
            return(AnimHandle.Invalid());
        }
Esempio n. 2
0
        public static AnimHandle Invalid()
        {
            var handle = new AnimHandle("", 0.0f, 1.0f);

            handle.m_isValid = false;
            return(handle);
        }