void Start() { anim = transform.GetChild(0).gameObject.GetComponent <Animator>(); anim2 = NextPotal.transform.GetChild(0).gameObject.GetComponent <Animator>(); MovingCubeControl = GameObject.Find("MovingCube").GetComponent <MovingCubeController>(); }
// Use this for initialization void Start() { currentAni = GetComponent <Animation> (); CharacterControl = GetComponent <CharacterController> (); KnightContainer = GameObject.Find("KnightContainer"); knightControl = knight.GetComponent <KnightControl>(); //Player = GameObject.Find ("Player"); movingCube = GameObject.Find("MovingCube"); movingController = movingCube.GetComponent <MovingCubeController>(); audio = GetComponent <AudioSource> (); //knight = knightControl.gameObject; lookAtPos = movingController.transform; currentPos = transform.position; if (FirstPersonControl.VR) { Vector3 vec3 = knight.transform.localPosition; vec3.z = 0; knight.transform.localPosition = vec3; } }
void Start() { len = monsters.Length; movingCubeController = GameObject.Find("MovingCube").GetComponent <MovingCubeController>(); }