// Start is called before the first frame update void Start() { mtc = GetComponent <MoveToTargetComponent>(); if (waypoints.Count > 0) { state = RatBrain.RatState.PATROL; currentWaypoint = waypoints[currentIndex]; mtc.BeginChasing(state, currentWaypoint); } else { state = RatBrain.RatState.UNDECIDED; } }
// Possible Rat States /* * 1. Patrolling * 2. Chasing */ // Start is called before the first frame update void Start() { sensingComp = GetComponent <SensingComponent>(); movingComp = GetComponent <MovingComponent>(); moveToTargetComp = GetComponent <MoveToTargetComponent>(); }