void DoSwitchRoleModel() { var role = new RoleInstance(PlayerRoleId.ToString()); player.BindRoleInstance(role, () => { var animator = player.GetAnimator(); animator.runtimeAnimatorController = player.GetComponent <Animator>().runtimeAnimatorController; //force set animator SwitchSkillPose(); }); }
public void SetPlayerSpeed(float speed) { if (_player == null) { return; } var animator = _playerView.GetAnimator(); if (animator != null) { animator.SetFloat("speed", speed); } }