public override bool OnRecord(Recordable previous, Object source)
        {
            var recorder = source as InputRecorder;

            if (recorder != null)
            {
                m_Inputs.AddRange(recorder.inputs);
                recorder.FlushInputs();
            }

            return(true);
        }
        public override bool OnRecord(Recordable previous, Object source)
        {
            var rigidBody = source as Rigidbody;
            var prev      = previous as RigidBodyRecordable;

            if (prev != null && prev.m_Speed == rigidBody.velocity)
            {
                return(false);
            }

            m_Speed = rigidBody.velocity;
            return(true);
        }
Esempio n. 3
0
        public override bool OnRecord(Recordable previous, Object source)
        {
            if (GameDebuggerRecorder.currentFrame % 60 == 0)
            {
                var s = source as MonoBehaviour;
                if (s != null)
                {
                    path = string.Format("{0}/../capture_{1}.png", Application.dataPath, GameDebuggerRecorder.currentFrame);
                    s.StartCoroutine(RecordFrame());
                }
                return(true);
            }

            return(false);
        }
        public override bool OnRecord(Recordable previous, Object source)
        {
            var animator = source as Animator;
            var prev     = previous as AnimatorRecordable;


            for (int i = 0; i < animator.layerCount; i++)
            {
                var result = mi.Invoke(animator, new object[] { i, true });
                LayerNames.Add(result as string);
            }

            if (prev != null && prev.LayerNames.SequenceEqual(LayerNames))
            {
                return(false);
            }

            return(true);
        }
        public override bool OnRecord(Recordable previous, Object source)
        {
            var t = (Transform)source;

            if (t.gameObject.isStatic)
            {
                return(false);
            }

            var prev = (TransformRecordable)previous;

            if (prev != null && prev.localPosition == t.position && prev.localRotation == t.rotation && prev.localScale == t.localScale)
            {
                return(false);
            }

            localPosition = t.localPosition;
            localRotation = t.localRotation;
            localScale    = t.localScale;

            return(true);
        }
Esempio n. 6
0
 public virtual bool OnRecord(Recordable previous, Object source)
 {
     return(true);
 }