コード例 #1
0
        public RootMotionData()
        {
            this.XKeys = new KeyframeDataCollection();
            this.YKeys = new KeyframeDataCollection();
            this.ZKeys = new KeyframeDataCollection();

            this.RXKeys = new KeyframeDataCollection();
            this.RYKeys = new KeyframeDataCollection();
            this.RZKeys = new KeyframeDataCollection();
        }
コード例 #2
0
        private void AddKeys(AnimationCurve curve, Skill.Editor.Animation.KeyframeDataCollection collection)
        {
            collection.Clear();
            if (curve == null)
            {
                return;
            }
            if (curve.keys == null || curve.keys.Length == 0)
            {
                return;
            }

            for (int i = 0; i < curve.keys.Length; i++)
            {
                var k = curve.keys[i];
                collection.Add(new Animation.KeyframeData(k.time, k.value, k.inTangent, k.outTangent));
            }
        }