// Use this for initialization void Start() { ChooseMaterial(); socialAgent = GetComponent <SocialAgent>(); travellingAgent = GetComponent <TravellingAgent>(); wanderingAgent = GetComponent <WanderingAgent>(); }
public void Damage(float damage) { Health.RuntimeValue -= damage; WanderingAgent wanderingAgent = GetComponent <WanderingAgent>(); if (wanderingAgent != null) { wanderingAgent.TookDamage(damage); } }