Ejemplo n.º 1
0
    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();
        });
    }
Ejemplo n.º 2
0
    public void SetPlayerSpeed(float speed)
    {
        if (_player == null)
        {
            return;
        }

        var animator = _playerView.GetAnimator();

        if (animator != null)
        {
            animator.SetFloat("speed", speed);
        }
    }