Beispiel #1
0
        private void setTopAnimation(AnimID id, bool reset = false)
        {
            if (mTopAnimID >= 0 && (int)mTopAnimID < NUM_ANIMS)
            {
                // if we have an old animation, fade it out
                mFadingIn[(int)mTopAnimID]  = false;
                mFadingOut[(int)mTopAnimID] = true;
            }

            mTopAnimID = id;

            if (id != AnimID.ANIM_NONE)
            {
                // if we have a new animation, enable it and fade it in
                mAnims[(int)id].Enabled = true;
                mAnims[(int)id].Weight  = 0;
                mFadingOut[(int)id]     = false;
                mFadingIn[(int)id]      = true;
                if (reset)
                {
                    mAnims[(int)id].TimePosition = 0;
                }
            }
        }
 public override string ToString()
 {
     return("AnimID=" + AnimID.ToString()
            + "/seq=" + SequenceNum.ToString()
            + "/objID=" + ObjectID.ToString());
 }
Beispiel #3
0
 public bool Equals(AnimationInfo other)
 {
     return(AnimID.Equals(other.AnimID) && Frames.Equals(other.Frames) && Count.Equals(other.Count) &&
            Forward.Equals(other.Forward) && Repeat.Equals(other.Repeat) && Delay.Equals(other.Delay));
 }