6156人加入学习
(22人评价)
Unity常用API方法与类详细讲解 - 知识理论篇

制作完成于2022年3月8日,基于Unity2020.3

价格 免费

using System.Collections; using System.Collections.Generic; using UnityEngine; public class No10_Animator : MonoBehaviour { public Animator animator; void Start() { animator.Play("Run"); animator.speed = 5; animator.speed = 0.5f; animator.SetFloat("Speed", 1); animator.SetBool("Dead",false); animator.SetInteger("HP", 100); print("当前速度参数是:" + animator.GetFloat("Speed")); } // Update is called once per frame void Update() { //按键切换动画状态 if (Input.GetKeyDown(KeyCode.W)) { animator.CrossFade("Walk", 1f); } } }

[展开全文]

授课教师

SiKi学院老师

课程特色

视频(111)
图文(1)
下载资料(2)