void Start() { GameObject main = GameObject.Find("MainGO"); attr = main.GetComponent <SteeringAttributes> (); characterController = gameObject.GetComponent <CharacterController> (); }
// Use this for initialization void Start() { acceleration = Vector3.zero; velocity = transform.forward; //get component references characterController = gameObject.GetComponent<CharacterController> (); steer = gameObject.GetComponent<Steer> (); //gets reference to the steer GameObject main = GameObject.Find("MainGO"); attr = main.GetComponent<SteeringAttributes> (); }
// Use this for initialization void Start() { acceleration = Vector3.zero; velocity = transform.forward; //get component references characterController = gameObject.GetComponent <CharacterController> (); steer = gameObject.GetComponent <Steer> (); //gets reference to the steer GameObject main = GameObject.Find("MainGO"); attr = main.GetComponent <SteeringAttributes> (); }
void Start() { acceleration = Vector3.zero; velocity = transform.forward; obstacles = GameObject.FindGameObjectsWithTag("Obstacle"); //get component references characterController = gameObject.GetComponent <CharacterController> (); steer = gameObject.GetComponent <Steer> (); steeringAtt = GameObject.Find("MainGO").GetComponent <SteeringAttributes> (); gm = GameObject.Find("MainGO").GetComponent <GameManager>(); }
void Start() { GameObject main = GameObject.Find("MainGO"); attr = main.GetComponent<SteeringAttributes> (); characterController = gameObject.GetComponent<CharacterController> (); }
void Start() { acceleration = Vector3.zero; velocity = transform.forward; obstacles = GameObject.FindGameObjectsWithTag ("Obstacle"); //get component references characterController = gameObject.GetComponent<CharacterController> (); steer = gameObject.GetComponent<Steer> (); steeringAtt = GameObject.Find("MainGO").GetComponent<SteeringAttributes> (); gm = GameObject.Find("MainGO").GetComponent<GameManager>(); }
// Use this for initialization void Start() { GameObject main = GameObject.Find("MainGO"); characterController = gameObject.GetComponent<CharacterController> (); attr = main.GetComponent<SteeringAttributes> (); GM = main.GetComponent<GameManager>(); attr = main.GetComponent<SteeringAttributes> (); //get component references acceleration = Vector3.zero; velocity = characterController.transform.forward; location = characterController.transform.position; }