Пример #1
0
 public override AnimatorTimeline.JSONInit getJSONInit(AMITarget target)
 {
     if (!_obj || keys.Count <= 0)
     {
         return(null);
     }
     AnimatorTimeline.JSONInit init = new AnimatorTimeline.JSONInit();
     init.type = "position";
     init.go   = _obj.gameObject.name;
     AnimatorTimeline.JSONVector3 v = new AnimatorTimeline.JSONVector3();
     v.setValue(getInitialPosition());
     init.position = v;
     return(init);
 }
Пример #2
0
 public override AnimatorTimeline.JSONInit getJSONInit(AMITarget target)
 {
     if (!_obj || keys.Count <= 0)
     {
         return(null);
     }
     AnimatorTimeline.JSONInit init = new AnimatorTimeline.JSONInit();
     init.type = "rotation";
     init.go   = _obj.gameObject.name;
     AnimatorTimeline.JSONQuaternion q = new AnimatorTimeline.JSONQuaternion();
     q.setValue(getInitialRotation());
     init.rotation = q;
     return(init);
 }
Пример #3
0
        public override AnimatorTimeline.JSONInit getJSONInit(AMITarget target)
        {
            if (!obj || keys.Count <= 0)
            {
                return(null);
            }
            AnimatorTimeline.JSONInit init = new AnimatorTimeline.JSONInit();
            init.type = "orientation";
            init.go   = obj.gameObject.name;
            Transform _target            = getInitialTarget(target);
            int       start_frame        = keys[0].frame;
            AMTrack   _translation_track = null;
            //if(start_frame > 0) _translation_track = parentTake.getTranslationTrackForTransform(_target);
            Vector3 _lookv3 = _target.transform.position;

            if (_translation_track)
            {
                _lookv3 = (_translation_track as AMTranslationTrack).getPositionAtFrame((_translation_track as AMTranslationTrack).GetTarget(target) as Transform, start_frame, 0, true);
            }
            AnimatorTimeline.JSONVector3 v = new AnimatorTimeline.JSONVector3();
            v.setValue(_lookv3);
            init.position = v;
            return(init);
        }