Beispiel #1
0
        public void add_motion(Sequence sequence, MotionData motionData, float speed)
        {
            if (motionData == null)
            {
                return;
            }

            sequence.SetVelocity(motionData.Velocity * speed);
            sequence.SetOmega(motionData.Omega * speed);

            for (var i = 0; i < motionData.Anims.Count; i++)
            {
                var animData = new AnimData(motionData.Anims[i], speed);
                sequence.append_animation(animData);
            }
        }
Beispiel #2
0
        public void InitDefaults()
        {
            if (Setup._dat.DefaultAnimation != 0)
            {
                Sequence.clear_animations();
                var animData = new Animation.AnimData();
                animData.AnimID    = Setup._dat.DefaultAnimation;
                animData.LowFrame  = 0;
                animData.HighFrame = Int32.MaxValue;
                Sequence.append_animation(animData);
                WeenieDesc.Destroy(animData);
            }

            if (Owner != null)
            {
                Owner.InitDefaults(Setup);
            }
        }
Beispiel #3
0
        public void append_animation(AnimData animData)
        {
            var node = new AnimSequenceNode(animData);

            if (!node.has_anim())
            {
                return;
            }

            AnimList.AddLast(node);
            FirstCyclic = AnimList.Last;

            if (CurrAnim == null)
            {
                CurrAnim    = AnimList.First;
                FrameNumber = CurrAnim.Value.get_starting_frame();
            }
        }
Beispiel #4
0
 public void AppendAnimation(AnimData animData)
 {
 }