Ejemplo n.º 1
0
        /// <summary>
        /// Reads the unmanaged data from the native value.
        /// </summary>
        /// <param name="nativeValue">Input native value</param>
        void IMarshalable <NodeAnimationChannel, AiNodeAnim> .FromNative(ref AiNodeAnim nativeValue)
        {
            m_nodeName  = nativeValue.NodeName.GetString();
            m_preState  = nativeValue.Prestate;
            m_postState = nativeValue.PostState;

            m_positionKeys.Clear();
            m_rotationKeys.Clear();
            m_scalingKeys.Clear();

            if (nativeValue.NumPositionKeys > 0 && nativeValue.PositionKeys != IntPtr.Zero)
            {
                m_positionKeys.AddRange(MemoryHelper.FromNativeArray <VectorKey>(nativeValue.PositionKeys, (int)nativeValue.NumPositionKeys));
            }

            if (nativeValue.NumRotationKeys > 0 && nativeValue.RotationKeys != IntPtr.Zero)
            {
                m_rotationKeys.AddRange(MemoryHelper.FromNativeArray <QuaternionKey>(nativeValue.RotationKeys, (int)nativeValue.NumRotationKeys));
            }

            if (nativeValue.NumScalingKeys > 0 && nativeValue.ScalingKeys != IntPtr.Zero)
            {
                m_scalingKeys.AddRange(MemoryHelper.FromNativeArray <VectorKey>(nativeValue.ScalingKeys, (int)nativeValue.NumScalingKeys));
            }
        }
Ejemplo n.º 2
0
    /// <summary>
    /// Nota: Si hay errores de Quaternion to Matrix comprobar que los parametros enviados son validos para el ejercicio indicado
    /// </summary>
    /// <param name="e"></param>
    /// <param name="param"></param>
    public void PrepareExercise(Exercise e, BehaviourParams param)
    {
        param.Angle = AngleFixer.FixAngle(param.Angle, e.Movement);
        if (param.Variations == null || param.Variations.Count == 0)
        {
            behaviour = AnimationBehaviour.GetBehaviour(e.Movement, e.Limb);
        }
        else
        {
            behaviour = AnimationBehaviour.GetCentralBehaviour(e.Movement, e.Limb);
        }

        if (behaviour == null)
        {
            Debug.LogError("No se encontró la máquina de estado. (Ejercicio = " + e.Movement + " "
                           + (int)e.Movement + ") (Limb = " + e.Limb + ")" +
                           "). Posiblemente se deba a una mala combinación de esos parámetros o el MonitoAnimatorController se bugeó");
            return;
        }

        behaviour.Prepare(param);
        behaviour.RepetitionEnd += behaviour_PrepareEnd;

        if (param.Variations == null || param.Variations.Count == 0)
        {
            CurrentExercise = e;
        }
        else
        {
            CurrentExercise = new Exercise(behaviour.randomAnimations[0], e.Limb);
        }
    }
Ejemplo n.º 3
0
 public IdleState(
     MovementBehaviour movementBehaviour,
     AnimationBehaviour animationBehaviour)
 {
     _movementBehaviour  = movementBehaviour;
     _animationBehaviour = animationBehaviour;
 }
Ejemplo n.º 4
0
 void OnAnimDestroy(AnimationBehaviour anim, float time)
 {
     foreach (var ground in _grounds)
     {
         ground.localScale = Vector3.one * time;
     }
 }
Ejemplo n.º 5
0
 public static void PlayCubeDroppedSound(this AnimationBehaviour target)
 {
     if (CurrentUserInfo.IsSoundEnabled)
     {
         target.GetComponent <AudioSource>().Play();
     }
 }
Ejemplo n.º 6
0
        /// <summary>
        /// Initializes a new instance of <see cref="AnimationNode"/> class.
        /// </summary>
        /// <param name="name">The name of the animation node.</param>
        /// <param name="positionKeys">The position keys data.</param>
        /// <param name="rotationKeys">The rotation keys data.</param>
        /// <param name="scalingKeys">The scaling keys data.</param>
        /// <param name="preState">The behaviour of the animation before the first key is encountered.</param>
        /// <param name="postState">The behaviour of the animation after the last key was processed.</param>
        public AnimationNode(
            string name,
            ReadOnlySpan <Vector3Key> positionKeys,
            ReadOnlySpan <QuaternionKey> rotationKeys,
            ReadOnlySpan <Vector3Key> scalingKeys,
            AnimationBehaviour preState  = AnimationBehaviour.Default,
            AnimationBehaviour postState = AnimationBehaviour.Default)
        {
            Name      = name;
            PreState  = preState;
            PostState = postState;

            _positionKeys      = Array.Empty <Vector3Key>();
            _rotationKeys      = Array.Empty <QuaternionKey>();
            _scalingKeys       = Array.Empty <Vector3Key>();
            _positionKeysCount = _rotationKeysCount = _scalingKeysCount = 0;

            var positions = Sort(positionKeys);
            var rotations = Sort(rotationKeys);
            var scales    = Sort(scalingKeys);

            InternalHelper.Set(ref _positionKeys, ref _positionKeysCount, positions);
            InternalHelper.Set(ref _rotationKeys, ref _rotationKeysCount, rotations);
            InternalHelper.Set(ref _scalingKeys, ref _scalingKeysCount, scales);

            _hashcode = 0;
            _hashcode = HashHelper <AnimationNode> .Combine(
                Name,
                PostState,
                PreState,
                HashHelper <Vector3Key> .Combine(PositionKeys),
                HashHelper <QuaternionKey> .Combine(RotationKeys),
                HashHelper <Vector3Key> .Combine(ScalingKeys));
        }
Ejemplo n.º 7
0
    public static AnimationBehaviour GetBehaviour(Movement m, Limb l)
    {
        int mov_search = (int)m / MAGIC_NUMBER;
        AnimationBehaviour encontrado = null;
        Animator           a          = GameObject.FindObjectOfType <AnimatorScript>().anim;

        AnimationBehaviour[] behaviours = a.GetBehaviours <AnimationBehaviour>();

        foreach (AnimationBehaviour lb in behaviours)
        {
            int lb_mov = (int)lb.movement / MAGIC_NUMBER;
            if (lb_mov == mov_search)
            {
                if (lb.animator == null)
                {
                    lb.animator = a;
                }

                if (lb.IsCentralNode && lb.limb == l)
                {
                    // Si se encontró un nodo central que calce con el 'Movement' entonces se retorna.
                    encontrado = lb;
                    break;
                }
                else if (!lb.HasCentralNode && lb.movement == m && l == lb.limb)
                {
                    encontrado = lb;
                }
            }
        }
        // Si no es un movimiento con nodo central, entonces se retorna. Se asume sin problemas que es el único encontrado.
        return(encontrado);
    }
Ejemplo n.º 8
0
 void behaviour_PrepareEnd(object sender, EventArgs e)
 {
     //        GoToIddle();
     //DebugLifeware.Log("Preparación terminada", DebugLifeware.Developer.Marco_Rojas);
     behaviour = sender as AnimationBehaviour;
     behaviour.RepetitionEnd -= behaviour_PrepareEnd;
     RaiseEvent(OnPrepareExerciseEnd, PrepareStatus.Prepared);
 }
Ejemplo n.º 9
0
        private void Awake()
        {
            _player             = GameObject.FindGameObjectWithTag(Tags.PLAYER).transform;
            _movementBehaviour  = GetComponent <MovementBehaviour>();
            _animationBehaviour = GetComponent <AnimationBehaviour>();
            _visionSensor       = GetComponent <VisionSensor>();

            CreateStages();
        }
Ejemplo n.º 10
0
    void Awake()
    {
        characterSource             = gameObject.AddComponent <AudioSource>();
        characterSource.volume      = 1.0f;
        characterSource.loop        = false;
        characterSource.playOnAwake = false;

        charAnim = gameObject.GetComponent <AnimationBehaviour>();
    }
Ejemplo n.º 11
0
    public void RunExerciseWeb(string s)
    {
        BehaviourParams p = JsonConvert.DeserializeObject <BehaviourParams>(s);

        behaviour = AnimationBehaviour.GetBehaviour(CurrentExercise.Movement, CurrentExercise.Limb);

        behaviour.Stop();
        p.Angle = AngleFixer.FixAngle(p.Angle, CurrentExercise.Movement);
        StartCoroutine(RunWebInSeconds(0.4f, p));
    }
Ejemplo n.º 12
0
 public void RunExercise(bool isInInstruction)
 {
     behaviour = AnimationBehaviour.GetBehaviour(CurrentExercise.Movement, CurrentExercise.Limb);
     behaviour.Run(isInInstruction);
     RewindExercise();
     behaviour.RepetitionEnd         -= behaviour_RepetitionEnd;
     behaviour.RepetitionEnd         += behaviour_RepetitionEnd;
     behaviour.RepetitionReallyStart -= behaviour_RepetitionReallyStart;
     behaviour.RepetitionReallyStart += behaviour_RepetitionReallyStart;
 }
Ejemplo n.º 13
0
    protected void initializeRandomAnimations(List <Movement> animations)
    {
        AnimationBehaviour central = AnimationBehaviour.GetCentralBehaviour(this.movement, this.limb);
        AnimationBehaviour ab      = (AnimationBehaviour)central;

        ab.randomAnimations           = animations;
        ab.actualRandomAnimationIndex = 0;

        //ab.friendsBehaviours = this.friendsBehaviours;
    }
Ejemplo n.º 14
0
        /// <summary>
        /// Constructs a new instance of the <see cref="NodeAnimationChannel"/> class.
        /// </summary>
        public NodeAnimationChannel()
        {
            m_nodeName  = String.Empty;
            m_preState  = AnimationBehaviour.Default;
            m_postState = AnimationBehaviour.Default;

            m_positionKeys = new List <VectorKey>();
            m_rotationKeys = new List <QuaternionKey>();
            m_scalingKeys  = new List <VectorKey>();
        }
Ejemplo n.º 15
0
 public CatchState(
     Transform owner,
     Transform player,
     AnimationBehaviour animationBehaviour,
     MovementBehaviour movementBehaviour)
 {
     _owner              = owner;
     _player             = player;
     _animationBehaviour = animationBehaviour;
     _movementBehaviour  = movementBehaviour;
 }
Ejemplo n.º 16
0
    protected void initializeRandomAnimations()
    {
        this.CentralNode.randomAnimations = new List <Movement>();
        List <AnimationBehaviour> friends = AnimationBehaviour.getFriendBehaviours(this.movement);

        foreach (AnimationBehaviour a in friends)
        {
            //randomAnimations.Add(new Movement(a.movement, a.laterality, a.limb));
            this.CentralNode.randomAnimations.Add(a.movement);
        }
    }
Ejemplo n.º 17
0
 void Awake()
 {
     if (!Instance)
     {
         Instance = this;
     }
     else
     {
         Debug.Log("Already in the Scene !");
         Destroy(this);
     }
 }
Ejemplo n.º 18
0
    void OnAnimMoveToContainer(AnimationBehaviour anim, float time)
    {
        var data = (Dictionary <string, object>)anim.Data;

        var camera           = data["camera"] as CameraController;
        var position         = (Vector3)data["position"];
        var rotation         = (Quaternion)data["rotation"];
        var orthographicSize = (float)data["orthographicSize"];

        camera.transform.localPosition = Vector3.Lerp(position, Vector3.zero, time);
        camera.transform.localRotation = Quaternion.Slerp(rotation, Quaternion.identity, time);
        camera.GetComponent <Camera>().orthographicSize = Mathf.Lerp(orthographicSize, _orthographicSize, time);
    }
Ejemplo n.º 19
0
    public void Start()
    {
        OriginalPosition   = ReferenceObject.transform.position;
        animationBehaviour =
            ReferenceObject.AddComponent(AnimationFactory.MakeAnimation(AnimationType)) as AnimationBehaviour;

        if (AnimationSettings != null)
        {
            animationBehaviour.AnimationSettings = AnimationSettings;
        }

        animationBehaviour.SetupSettings();
        animationBehaviour.OnComplete = OnComplete;
        animationBehaviour.StartAnimate();
    }
Ejemplo n.º 20
0
 void behaviour_PrepareEndWeb(object sender, EventArgs e)
 {
     //behaviour = sender as LerpBehaviour;
     behaviour = sender as AnimationBehaviour;
     behaviour.RepetitionEnd -= behaviour_PrepareEndWeb;
     //Debug.Log(timeSinceStartPrepareWeb + "  < " + Time.time + " - " + DELAY_TO_FAST_PREPARE + " =" + (Time.time - DELAY_TO_FAST_PREPARE));
     if (timeSinceStartPrepareWeb > Time.time - DELAY_TO_FAST_PREPARE)
     {
         StartCoroutine(RaiseEvent(OnPrepareExerciseEnd, PrepareStatus.Prepared, DELAY_TO_FAST_PREPARE));
     }
     else
     {
         RaiseEvent(OnPrepareExerciseEnd, PrepareStatus.Prepared);
     }
 }
    public void Init(float speedFactor, float strafeFactor, float alpha)
    {
        this.alpha = alpha;
        BlendShaders(transform);

        this.speedFactor  = speedFactor;
        this.strafeFactor = strafeFactor;

        AnimationBehaviour anim = GetComponent <AnimationBehaviour>();

        if (null != anim)
        {
            anim.Init(speedFactor);
        }
    }
Ejemplo n.º 22
0
        void StratAnimation(float targetValue, PostEffectsTypes type, Action <AnimationBehaviour> animationFinishedHandler = null)
        {
            AnimationBehaviour behaviour = m_AnimationBehaviours[type];

            //Событие окончания анимации
            if (animationFinishedHandler != null)
            {
                behaviour.OnAnimationFinished += animationFinishedHandler;
            }

            //Добавить эффект в список активных
            m_ActiveAnimationBehaviours.Add(behaviour);

            //Начать анимацию
            behaviour.StartAnimation(targetValue);
        }
Ejemplo n.º 23
0
    public void StopExercise()
    {
        behaviour = AnimationBehaviour.GetBehaviour(CurrentExercise.Movement, CurrentExercise.Limb);

        if (behaviour == null)
        {
            return;
        }

        behaviour.Stop();

        behaviour.RepetitionEnd         -= behaviour_RepetitionEnd;
        behaviour.RepetitionEnd         -= behaviour_PrepareEnd;
        behaviour.RepetitionEnd         -= behaviour_PrepareEndWeb;
        behaviour.RepetitionReallyStart -= behaviour_RepetitionReallyStart;
    }
Ejemplo n.º 24
0
        void ColorGradingNormalizeAnimationFinished(AnimationBehaviour behaviour)
        {
            behaviour.OnAnimationFinished -= ColorGradingNormalizeAnimationFinished;

            //Выключить Color grading
            m_Profile.colorGrading.enabled = false;

            //Выключить камеру
            if (ColorGradingCamera.enabled)
            {
                ColorGradingCamera.enabled = false;
            }

            //Выключить обработку эффектов
            if (Behaviour.enabled)
            {
                Behaviour.enabled = false;
            }
        }
Ejemplo n.º 25
0
        /// <summary>
        /// Constructs a new NodeAnimation.
        /// </summary>
        /// <param name="nodeAnim">Unmanaged AiNodeAnim struct</param>
        internal NodeAnimationChannel(AiNodeAnim nodeAnim)
        {
            _nodeName = nodeAnim.NodeName.GetString();
            _preState = nodeAnim.Prestate;
            _postState = nodeAnim.PostState;

            //Load position keys
            if(nodeAnim.NumPositionKeys > 0 && nodeAnim.PositionKeys != IntPtr.Zero) {
                _positionKeys = MemoryHelper.MarshalArray<VectorKey>(nodeAnim.PositionKeys, (int) nodeAnim.NumPositionKeys);
            }

            //Load rotation keys
            if(nodeAnim.NumRotationKeys > 0 && nodeAnim.RotationKeys != IntPtr.Zero) {
                _rotationKeys = MemoryHelper.MarshalArray<QuaternionKey>(nodeAnim.RotationKeys, (int) nodeAnim.NumRotationKeys);
            }

            //Load scaling keys
            if(nodeAnim.NumScalingKeys > 0 && nodeAnim.ScalingKeys != IntPtr.Zero) {
                _scalingKeys = MemoryHelper.MarshalArray<VectorKey>(nodeAnim.ScalingKeys, (int) nodeAnim.NumScalingKeys);
            }
        }
Ejemplo n.º 26
0
    public void PrepareExerciseWeb(string s)
    {
        RaiseEvent(OnPrepareExerciseStart, PrepareStatus.Preparing);
        PrepareExerciseWebParams pwp = JsonConvert.DeserializeObject <PrepareExerciseWebParams>(s);
        Exercise e = (pwp.Exercise) as Exercise;

        this.prepareCaller = (Caller)(pwp.Caller);
        //Exercise e = JsonConvert.DeserializeObject<Exercise>(s);

        behaviour = AnimationBehaviour.GetBehaviour(e.Movement, e.Limb);
        if (behaviour == null)
        {
            DebugLifeware.LogAllDevelopers("Importante: Behaviour no encontrado");
            RaiseEvent(OnPrepareExerciseEnd, PrepareStatus.NotFound);
            return;
        }
        behaviour.RepetitionEnd += behaviour_PrepareEndWeb;
        timeSinceStartPrepareWeb = Time.time;
        behaviour.PrepareWeb();
        CurrentExercise = e;
    }
Ejemplo n.º 27
0
        /// <summary>
        /// Creates a new animation sampler from a list of keyframes
        /// </summary>
        /// <param name="keyframes">List of samples</param>
        /// <param name="interpolation">Interpolation method to use</param>
        public JointAnimationSampler(JointAnimationKeyFrame[] keyframes,
                                     AnimationInterpolation interpolation)
        {
            _keyframes     = keyframes;
            _interpolation = interpolation;

            if (_interpolation != AnimationInterpolation.Linear)
            {
                // Right now only linear interpolation is supported
                _interpolation = AnimationInterpolation.Linear;
            }

            if (keyframes == null || keyframes.Length == 0)
            {
                throw new ApplicationException("Sampler needs keyframes");
            }

            StartTime = keyframes[0].Time;
            EndTime   = keyframes[keyframes.Length - 1].Time;

            PostBehaviour = AnimationBehaviour.Cycle;
        }
Ejemplo n.º 28
0
		public void Play(AnimationBehaviour behaviour)
		{
			throw new NotImplementedException();
		}
Ejemplo n.º 29
0
		public void Play(AnimationBehaviour behaviour, AnimationDirection direction, int loopCount)
		{
			throw new NotImplementedException();
		}
Ejemplo n.º 30
0
 public void Play(AnimationBehaviour behaviour, AnimationDirection direction)
 {
 }
Ejemplo n.º 31
0
 public void Play(AnimationBehaviour behaviour)
 {
 }
Ejemplo n.º 32
0
 public void Play(AnimationBehaviour behaviour, AnimationDirection direction, int loopCount)
 {
 }
Ejemplo n.º 33
0
 void behaviour_PrepareEndWeb(object sender, EventArgs e)
 {
     //behaviour = sender as LerpBehaviour;
     behaviour = sender as AnimationBehaviour;
     behaviour.RepetitionEnd -= behaviour_PrepareEndWeb;
     //Debug.Log(timeSinceStartPrepareWeb + "  < " + Time.time + " - " + DELAY_TO_FAST_PREPARE + " =" + (Time.time - DELAY_TO_FAST_PREPARE));
     if (timeSinceStartPrepareWeb > Time.time - DELAY_TO_FAST_PREPARE)
         StartCoroutine(RaiseEvent(OnPrepareExerciseEnd, PrepareStatus.Prepared, DELAY_TO_FAST_PREPARE));
     else 
         RaiseEvent(OnPrepareExerciseEnd, PrepareStatus.Prepared);
 }
Ejemplo n.º 34
0
 void behaviour_PrepareEnd(object sender, EventArgs e)
 {
     //        GoToIddle();
     //DebugLifeware.Log("Preparación terminada", DebugLifeware.Developer.Marco_Rojas);
     behaviour = sender as AnimationBehaviour;
     behaviour.RepetitionEnd -= behaviour_PrepareEnd;
     RaiseEvent(OnPrepareExerciseEnd, PrepareStatus.Prepared);
 }
Ejemplo n.º 35
0
 public void RunExercise(bool isInInstruction)
 {
     behaviour = AnimationBehaviour.GetBehaviour(CurrentExercise.Movement, CurrentExercise.Limb);
     behaviour.Run(isInInstruction);
     RewindExercise();
     behaviour.RepetitionEnd -= behaviour_RepetitionEnd;
     behaviour.RepetitionEnd += behaviour_RepetitionEnd;
     behaviour.RepetitionReallyStart -= behaviour_RepetitionReallyStart;
     behaviour.RepetitionReallyStart += behaviour_RepetitionReallyStart;
 }
Ejemplo n.º 36
0
 void VignetteHideAnimationFinished(AnimationBehaviour behaviour)
 {
     behaviour.OnAnimationFinished -= VignetteHideAnimationFinished;
     Vignette.enabled = false;
 }
Ejemplo n.º 37
0
    public void StopExercise()
    {
        behaviour = AnimationBehaviour.GetBehaviour(CurrentExercise.Movement, CurrentExercise.Limb);

        if (behaviour == null)
            return;

        behaviour.Stop();

        behaviour.RepetitionEnd -= behaviour_RepetitionEnd;
        behaviour.RepetitionEnd -= behaviour_PrepareEnd;
        behaviour.RepetitionEnd -= behaviour_PrepareEndWeb;
        behaviour.RepetitionReallyStart -= behaviour_RepetitionReallyStart;
    }
Ejemplo n.º 38
0
 public void RunExerciseWebWithoutParams()
 {
     behaviour = AnimationBehaviour.GetBehaviour(CurrentExercise.Movement, CurrentExercise.Limb);
     behaviour.Stop();
     StartCoroutine(RunWebInSeconds(0.4f));
 }
Ejemplo n.º 39
0
    public void RunExerciseWeb(string s)
    {
        BehaviourParams p = JsonConvert.DeserializeObject<BehaviourParams>(s);
        behaviour = AnimationBehaviour.GetBehaviour(CurrentExercise.Movement, CurrentExercise.Limb);

        behaviour.Stop();
        p.Angle = AngleFixer.FixAngle(p.Angle, CurrentExercise.Movement);
        StartCoroutine(RunWebInSeconds(0.4f, p));

    }
Ejemplo n.º 40
0
 public void Play(AnimationBehaviour behaviour)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 41
0
 void AnimationFinishedHandler(AnimationBehaviour behaviour)
 {
     m_ActiveAnimationBehaviours.Remove(behaviour);
     Disable();
 }
Ejemplo n.º 42
0
 public void Play(AnimationBehaviour behaviour, AnimationDirection direction, int loopCount)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 43
0
 public void ResumeExercise()
 {
     behaviour = AnimationBehaviour.GetBehaviour(CurrentExercise.Movement, CurrentExercise.Limb);
     behaviour.ResumeAnimation();
 }
Ejemplo n.º 44
0
    /// <summary>
    /// Nota: Si hay errores de Quaternion to Matrix comprobar que los parametros enviados son validos para el ejercicio indicado
    /// </summary>
    /// <param name="e"></param>
    /// <param name="param"></param>
    public void PrepareExercise(Exercise e, BehaviourParams param)
    {

        param.Angle = AngleFixer.FixAngle(param.Angle, e.Movement);
        if (param.Variations == null || param.Variations.Count == 0)
            behaviour = AnimationBehaviour.GetBehaviour(e.Movement, e.Limb);
        else
            behaviour = AnimationBehaviour.GetCentralBehaviour(e.Movement, e.Limb);

        if (behaviour == null)
        {
            Debug.LogError("No se encontró la máquina de estado. (Ejercicio = " + e.Movement + " "
                + (int)e.Movement + ") (Limb = " + e.Limb + ")" +
                "). Posiblemente se deba a una mala combinación de esos parámetros o el MonitoAnimatorController se bugeó");
            return;
        }

        behaviour.Prepare(param);
        behaviour.RepetitionEnd += behaviour_PrepareEnd;

        if (param.Variations == null || param.Variations.Count == 0)
            CurrentExercise = e;
        else
            CurrentExercise = new Exercise(behaviour.randomAnimations[0], e.Limb);
    }
Ejemplo n.º 45
0
    public void PrepareExerciseWeb(string s)
    {
        RaiseEvent(OnPrepareExerciseStart, PrepareStatus.Preparing);
        PrepareExerciseWebParams pwp = JsonConvert.DeserializeObject<PrepareExerciseWebParams>(s);
        Exercise e = (pwp.Exercise) as Exercise;
        this.prepareCaller = (Caller)(pwp.Caller);
        //Exercise e = JsonConvert.DeserializeObject<Exercise>(s);

        behaviour = AnimationBehaviour.GetBehaviour(e.Movement, e.Limb);
        if (behaviour == null)
        {
            DebugLifeware.LogAllDevelopers("Importante: Behaviour no encontrado");
            RaiseEvent(OnPrepareExerciseEnd, PrepareStatus.NotFound);
            return;
        }
        behaviour.RepetitionEnd += behaviour_PrepareEndWeb;
        timeSinceStartPrepareWeb = Time.time;  
        behaviour.PrepareWeb();
        CurrentExercise = e;    
    }