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.

负值将回放动画。

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;
Page last updated: 2011-1-7