I would very pleased to get assistance on what I’m doing wrong here:
#pragma strict
var HUDDIS : Transform;
var NOPASSIS : Transform;
var CAMMIS : Transform;
var CAMMIMATION : Transform;
function Start () {
}
function Update () {
if(Input.GetKeyDown(KeyCode.E))
UpdatePETS();
}
function UpdatePETS () {
if(HUDDIS.active){
NOPASSIS.active = false;
HUDDIS.active = false;
CAMMIS.GetComponent(CameraSwitcher).enabled = false;
CAMMIMATION.GetComponent(Animation).enabled = false;
} else {
HUDDIS.active = true;
NOPASSIS.active = true;
CAMMIS.GetComponent(CameraSwitcher).enabled = true;
CAMMIMATION.GetComponent(Animation).enabled = true;
Destroy (this);
}
}
The animaton component “(Animation)” refuses to be disabled when I’m pressing “E”. What am I doing wrong? It is a stock animation component btw, does it therefore have an entirely different definition?