/// <summary> /// Link all Parameters to the animator /// </summary> public virtual void LinkingAnimator() { if (!Death) { Anim.SetFloat(hash_Vertical, vertical); Anim.SetFloat(hash_Horizontal, horizontal); Anim.SetBool(hash_Stand, stand); Anim.SetBool(hash_Shift, Shift); Anim.SetBool(hash_Jump, jump); Anim.SetBool(hash_Attack1, attack1); Anim.SetBool(hash_Damaged, damaged); Anim.SetBool(hash_Action, action); Anim.SetInteger(hash_IDAction, ActionID); Anim.SetInteger(hash_IDInt, IDInt); //The problem is that is always zero if you change it externally; //Optional Animator Parameters if (hasSlope) { Anim.SetFloat(hash_Slope, Slope); } if (hasStun) { Anim.SetBool(hash_Stunned, stun); } if (hasAttack2) { Anim.SetBool(hash_Attack2, attack2); } if (hasUpDown) { Anim.SetFloat(hash_UpDown, movementAxis.y); } if (hasStateTime) { Anim.SetFloat(hash_StateTime, StateTime); } if (hasDodge) { Anim.SetBool(hash_Dodge, dodge); } if (hasFly && canFly) { Anim.SetBool(hash_Fly, Fly); } if (hasSwim && canSwim) { Anim.SetBool(hash_Swim, swim); } if (hasUnderwater && CanGoUnderWater) { Anim.SetBool(hash_Underwater, underwater); } } Anim.SetBool(hash_Fall, fall); //Update fall either if is death or not OnSyncAnimator.Invoke(); //Ready to Sync all the parameters with external scripts ... (Riding System) }
/// <summary> /// Link all Parameters to the animator /// </summary> public virtual void LinkingAnimator() { if (!Death) { Anim.SetFloat(Hash.Vertical, speed); Anim.SetFloat(Hash.Horizontal, direction); Anim.SetFloat(Hash.Slope, slope); Anim.SetBool(Hash.Shift, shift); Anim.SetBool(Hash.Stand, stand); Anim.SetBool(Hash._Jump, jump); Anim.SetBool(Hash.Attack1, attack1); Anim.SetBool(Hash.Damaged, damaged); Anim.SetBool(Hash.Stunned, stun); Anim.SetBool(Hash.Action, action); Anim.SetInteger(Hash.IDAction, actionID); Anim.SetInteger(Hash.IDInt, IDInt); //The problem is that is always zero if you change it externally; //Optional Animator Parameters if (hasAttack2) { Anim.SetBool(Hash.Attack2, attack2); } if (hasUpDown) { Anim.SetFloat(Hash.UpDown, movementAxis.y); } if (hasDodge) { Anim.SetBool(Hash.Dodge, dodge); } if (hasFly && canFly) { Anim.SetBool(Hash.Fly, Fly); } if (hasSwim && canSwim) { Anim.SetBool(Hash.Swim, swim); } if (hasUnderwater && CanGoUnderWater) { Anim.SetBool(Hash.Underwater, underwater); } } Anim.SetBool(Hash.Fall, fall); //Calculate fall either if is death or not OnSyncAnimator.Invoke(); //Ready to Sync all the parameters with external scripts ... (Ridign System) }