void StateUpdate_IdlePatrol()
 {
     if (HasReachedMyDestination())
     {
         patrolNode = patrolNode.nextNode;
         navMeshAgent.SetDestination(patrolNode.GetPosition());
     }
 }
    ///////////////////////////////////////////////////////// STATE: IDLE PATROL


    void StateInit_IdlePatrol()
    {
        navMeshAgent.speed = 6.0f;
        navMeshAgent.SetDestination(patrolNode.GetPosition());
    }
    //////////////////////////////////////////////////////////////////////////

    ///////////////////////////// Action: PATROL /////////////////////////////
    void ActionInit_Patrol()
    {
        SetAction(NPC_EnemyAction.PATROL);
        navMeshAgent.speed = 6.0f;
        navMeshAgent.SetDestination(patrolNode.GetPosition());
    }
Exemple #4
0
    //////////////////////////////////////////////////////////////////////////

    ///////////////////////////// Action: PATROL /////////////////////////////
    void ActionInit_Patrol()
    {
        navMeshAgent.speed = 6.0f;
        navMeshAgent.SetDestination(patrolNode.GetPosition());
    }
/*	public override void DefineNode(){
 *
 *      }
 *      public override void OnNPCEnter ()
 *      {
 *
 *      }
 *      public override void OnNPCExit ()
 *      {
 *
 *      }*/
    public Vector3 GetNextNodePosition()
    {
        return(nextNode.GetPosition());
    }