public override void Initialize(GameObject agent, Chalkboard chalkboard) { base.Initialize(agent, chalkboard); Debug.Assert(moveToBehaviour != null, "The Examine behaviour requires that a movement " + "behaviour is provided otherwise the agent cannot move to the interaction point."); chalkboard.Add("NavMeshAgent", agent.GetComponent <NavMeshAgent>()); moveToBehaviour.Initialize(agent.gameObject, chalkboard); }
void Start() { gunLine = weapon.GetComponent <LineRenderer>(); TestSetGunLine(); moveToState.Initialize(this); lookAroundState.Initialize(this); alertState.Initialize(this); attackState.Initialize(this); TransitState(lookAroundState); }