Assets/Scripts/Door.cs(15,30): error CS1061: Type `UnityEngine.GameObject' does not contain a definition for `Status' and no extension method `Status' of type `UnityEngine.GameObject' could be found (are you missing a using directive or an assembly reference?)
|
Никак не хотит через точку....
using UnityEngine;
using System.Collections;
public class Door : MonoBehaviour {
public GameObject Activator;
// Use this for initialization
void Start () {
}
private int anim=0;
// Update is called once per frame
void Update () {
if(Activator.status){
anim=1;
if(!animation.isPlaying && anim==1) animation.Play("Open");
else{
if(!animation.isPlaying && anim==1) animation.Play("Close");
anim=0;
}
}
}
}