Esempio n. 1
0
    void Start()
    {
        GameObject main = GameObject.Find("MainGO");

        attr = main.GetComponent <SteeringAttributes> ();
        characterController = gameObject.GetComponent <CharacterController> ();
    }
Esempio n. 2
0
    // 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> ();
    }
Esempio n. 3
0
    // 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> ();
    }
Esempio n. 4
0
    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>();
    }
Esempio n. 5
0
 void Start()
 {
     GameObject main = GameObject.Find("MainGO");
     attr = main.GetComponent<SteeringAttributes> ();
     characterController = gameObject.GetComponent<CharacterController> ();
 }
Esempio n. 6
0
    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>();
    }
Esempio n. 7
0
    // 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;
    }