Не могу найти в чем проблема
Синтаксис:
Используется csharp
using UnityEngine;
using System.Collections;
public class Jump228 : MonoBehaviour {
public CharacterMotor mot;
public CharacterController228 chara;
public AnimationClip Jumping228 ;
public float speed228;
public float Timer;
private float TimerDown;
// Update is called once per frame
void Start () {
TimerDown = Timer;
chara.enabled = true;
animation [Jumping228.name].speed = speed228;
}
void Update (){
if (Input.GetKeyDown (KeyCode.Space)) {
if(TimerDown > 0) TimerDown -= Time.deltaTime;
if(TimerDown < 0) TimerDown = 0;
animation.Play (Jumping228.name);
animation.wrapMode = WrapMode.Once;
chara.enabled = false;
mot.enabled = true;
}
if (Timer == 0) {
chara.enabled = true;
}
}
}
using System.Collections;
public class Jump228 : MonoBehaviour {
public CharacterMotor mot;
public CharacterController228 chara;
public AnimationClip Jumping228 ;
public float speed228;
public float Timer;
private float TimerDown;
// Update is called once per frame
void Start () {
TimerDown = Timer;
chara.enabled = true;
animation [Jumping228.name].speed = speed228;
}
void Update (){
if (Input.GetKeyDown (KeyCode.Space)) {
if(TimerDown > 0) TimerDown -= Time.deltaTime;
if(TimerDown < 0) TimerDown = 0;
animation.Play (Jumping228.name);
animation.wrapMode = WrapMode.Once;
chara.enabled = false;
mot.enabled = true;
}
if (Timer == 0) {
chara.enabled = true;
}
}
}
Скрипт выключается , но не включается