Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
    void Start()
    {
        gunLine = weapon.GetComponent <LineRenderer>();
        TestSetGunLine();

        moveToState.Initialize(this);
        lookAroundState.Initialize(this);
        alertState.Initialize(this);
        attackState.Initialize(this);

        TransitState(lookAroundState);
    }