Показать сообщение отдельно
Старый 17.05.2014, 16:03   #41
CostUm
ПроЭктировщик
 
Регистрация: 09.11.2007
Сообщений: 141
Написано одно полезное сообщение
Re: Активация скрипта по требованию

Есть, AIAnimation, по идеи эти 2 скрипта вместе работают, т.к. 1 гоняет его по вейпоинтам, другой анимирует
var minimumRunSpeed = 1.0;

function Start () {
    
// Set all animations to loop
    
animation.wrapMode WrapMode.Loop;

    
// Except our action animations, Dont loop those
    
animation["Take 001"].wrapMode WrapMode.Once;
    
    
// Put idle and run in a lower layer. They will only animate if our action animations are not playing
    
animation["Take 001"].layer = -1;
    
animation["Take 001"].layer = -1;
    
animation["Take 001"].layer = -1;
    
    
animation.Stop();
}

function 
SetSpeed (speed float) {
    if (
speed minimumRunSpeed)
        
animation.CrossFade("Take 001");
    else
        
animation.CrossFade("Take 001");

(Offline)
 
Ответить с цитированием