public void Activate(GameObject[] wallArray) { for (int i = 0; i < wallArray.Length; i++) { MoveBlade temp = wallArray[i].GetComponent <MoveBlade>(); //having trouble changin the variable through temp... always keeps on being true; temp.MoveUp = false; } }
public void UnActivate(GameObject[] wallArray) { //Debug.Log(wallArray.Length); for (int i = 0; i < wallArray.Length; i++) { MoveBlade temp = wallArray[i].GetComponent <MoveBlade>(); temp.MoveUp = true; //Debug.Log(wallArray[i].name); } }