// Use this for initialization void Start() { //used to know when to allow movement GameObject gui = GameObject.FindGameObjectWithTag("Gui"); pause = gui.GetComponent<Pause>(); //constructs a plane facing up that is the same level as the water //GameObject water = GameObject.Find ("Water"); horoPlane = new Plane (Vector3.up, new Vector3(0, 0.5f, 0)); verticalPlane = new Plane (Vector3.forward, new Vector3 (0, 0, 78)); //Get tongue object script to control rotation //tongue = GameObject.FindGameObjectWithTag ("Tongue").GetComponent<Tongue> (); tongue = GameObject.Find ("Tongue").GetComponent<NewTongue> (); //Starts with old control style }
// Use this for initialization void Start() { currentHealth = maxHealth; currentEnergy = maxEnergy; aCalib = Input.acceleration; score = 0; streak = 0; controller = GetComponent<CharacterController> (); //Pause.setPause(false); comboScript = GetComponent<Combo> (); //cheat detect hasCheated = false; scoreCheck = cheatOffset; numTimesIncrementScore = 0; changingScore = false; tongue = GameObject.Find ("Tongue").GetComponent<NewTongue> (); LastState = PlayerAnimator.PlayerState.TongueIn; _state = PlayerAnimator.PlayerState.TongueIn; tripMode = GetComponent<TripMode> (); }