Exemple #1
0
 // Use this for initialization
 void Start()
 {
     m_weapon = GetComponent<ShootAtTargetWhenFacing>();
     m_player = FindObjectOfType<PlayerMovementController>().gameObject;
     m_speeder = FindObjectOfType<SpeederController>().gameObject;
 }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        Player = GameObject.FindWithTag("Player");
        m_rigidbody = GetComponent<Rigidbody>();
        m_weapon = GetComponent<ShootAtTargetWhenFacing>();

        //Set the centre of this bot's patrol to be the average starting position of its nearby flockmates.
        m_patrolCentre = getAveragePositionOfFlock();
    }