AnimationState.speed 速度
var speed : float
Description描述
The playback speed of the animation. 1 is normal playback speed.
动画的播放速度。1为正常速度。
A negative playback speed will play the animation backwards.
负值将回放动画。
C#
JavaScript
using UnityEngine;using System.Collections;public class example : MonoBehaviour {public void Awake() {animation["Walk"].speed = -1.0F;animation["Walk"].speed = 2;}}
// Walk backwards// 向后走animation["Walk"].speed = -1.0;// Walk at double speed// 2倍加速播放animation["Walk"].speed = 2;