Пример #1
0
 public internalFrameData(HitboxAnimation source, int frameID)
 {
     frame        = source.frameData[frameID];
     hasnextframe = ((frameID + 1) < source.frameData.Length);
     framerate    = (source.clip != null)
         ? source.clip.frameRate
         : 0f;
 }
Пример #2
0
        void UpdateHitbox(internalFrameData animdata, int anim, int frame)
        {
#if UNITY_EDITOR
            if (Application.isPlaying == false)
            {
                return;
            }
#endif

            m_CurrentAnimation = anim;
            m_CurrentFrame     = frame;
            internalHitboxData framedata = animdata.frame;
            // var nextframedata = animdata.nextframe;

            if (framedata.collider != null)
            {
                for (int i = 0; i < framedata.collider.Length; i++)
                {
                    var collider = framedata.collider[i];
                    var rect     = collider.rect;
                }
            }
        }