Esempio n. 1
0
        private void ToDeactivatedLayer(DeactivatedLocomLayerParams param)
        {
            LayerWeightTarget = 0;
            StopLocomotionWithAgent();

            LocomType                = PredefinedLocomType.DeactivatedLayer;
            TurnToTransform          = null;
            MoveToTransformWithAgent = null;
            rb.isKinematic           = param.DeactivateRigidbody;
            animator.SetFloat("Speed", 0);
            if (player.Animator.GetFloat("VelX") > .5f)
            {
                player.Animator.SetFloat("VelX", .5f);
            }
            else
            {
                player.Animator.SetFloat("VelX", 0f);
            }
            if (player.Animator.GetFloat("VelY") > .5f)
            {
                player.Animator.SetFloat("VelY", .5f);
            }
            else
            {
                player.Animator.SetFloat("VelY", 0f);
            }
        }
Esempio n. 2
0
 public void OverrideToDeactivatedLayer(DeactivatedLocomLayerParams param, short priority, string id)
 {
     LocomTypeDict.Override(id, priority, param);
     if (LocomTypeDict.LastId == id)
     {
         ToDeactivatedLayer(param);
     }
 }