public float speed ;

描述

该动画的播放速度。1 表示正常播放速度。

播放速度为负值时,将向后播放动画。

另请参阅:AnimationState.timeAnimationState.wrapMode 属性和 WrapMode 枚举。

using UnityEngine;
using System.Collections;

public class ExampleScript : MonoBehaviour { public Animation anim;

void Start() { // Walk backwards anim["Walk"].speed = -1.0f;

// Walk at double speed anim["Walk"].speed = 2.0f; } }