Example #1
0
 protected void Awake()
 {
     steeringBehaviours = GetComponents <SteeringBehaviour>();
     movement           = GetComponent <Movement>();
     avoider            = GetComponent <ObstacleAvoider>();
     avoiderFrog        = GetComponent <ObstacleAvoiderFrog>();
 }
Example #2
0
    public void Update()
    {
        // Change trees if we're stuck
        ObstacleAvoider avoider = GetComponent <ObstacleAvoider>();

        if ((avoider != null) && (avoider.isStuck))
        {
            UpdateTree();
        }
    }