public override void InitializeAgent() { base.InitializeAgent(); rb = GetComponent <Rigidbody>(); myArea = area.GetComponent <CollectorArea>(); myRayPer = GetComponent <RayPerception3D>(); myAcademy = FindObjectOfType <CollectorAcademy>(); }
void Start() { y = transform.position.y; internalStepCount = 0; isDoneCalled = false; collectorAcademy = GetComponentInParent <CollectorAcademy>(); rBody = GetComponent <Rigidbody>(); // assign states to dictionary and set AssignStateDictionary(); CurrentState = States.Idle; }