Example #1
0
 // Use this for initialization
 void Start()
 {
     ChooseMaterial();
     socialAgent     = GetComponent <SocialAgent>();
     travellingAgent = GetComponent <TravellingAgent>();
     wanderingAgent  = GetComponent <WanderingAgent>();
 }
Example #2
0
    public void Damage(float damage)
    {
        Health.RuntimeValue -= damage;

        WanderingAgent wanderingAgent = GetComponent <WanderingAgent>();

        if (wanderingAgent != null)
        {
            wanderingAgent.TookDamage(damage);
        }
    }