//public Transform walkTarget; // Use this for initialization void Start() { agent = GetComponent <NavMeshAgent>(); behaviors = new Stack <Behavior>(); // WalkTowardBehavior attemptPush = thingThatHoldsBehaviours.GetComponent<WalkTowardBehavior>(); // behaviors.Push(attemptPush); //newWalkBehaviour.target = walkTarget; //behaviours.Push(newWalkBehaviour); GoToAcidBehavior attempt = thingThatHoldsBehaviors.GetComponent <GoToAcidBehaviors>(); attempt.acid = acid; behaviors.Push(attempt) }
// Use this for initialization void Start() { //walkTowards = GetComponent<WalkTowardsBehavior>(); agent = GetComponent <NavMeshAgent>(); behaviors = new Stack <Behavior>(); GoToAcidBehavior attempt = thingThatHoldsBehaviors.GetComponent <GoToAcidBehavior>(); behaviors.Push(attempt); //WalkTowardsBehavior attemptPush = thingThatHoldsBehaviors.GetComponent<WalkTowardsBehavior>(); //behaviors.Push(attemptPush); //behaviors.Push(walkTowards); //WalkTowardsBehavior newWalkBehavior = new WalkTowardsBehavior(); //newWalkBehavior.target = walkTarget; //behaviors.Push(newWalkBehavior); }