Example #1
0
            //////////////////////////////////////////////////////////////////////////////
            //                                                                          //
            //Unity Functions                                                           //
            //                                                                          //
            //////////////////////////////////////////////////////////////////////////////
            // Use this for initialization
            void Start()
            {
                transform.position = Vector3.zero;

                navMeshAgent = GetComponent<NavMeshAgent>();

                Vector3 destination = Random.insideUnitSphere * 35;
                destination.y = 0;
                navMeshAgent.SetDestination(destination);

                speed = Random.Range(0.75f, 1.25f);
            }
        void Awake ()
        {
            _navMeshAgent = this.GetComponentInChildren<NavMeshAgent>();

            _path = new List<Transform>();
            if(PathContainer != null)
            {
                foreach (Transform child in PathContainer)
                {
                    _path.Add(child);
                }
            }
            else
            {
                Debug.LogWarning("No path set.");
            }
        }
Example #3
0
 // Use this for initialization
 void Start()
 {
     GeneratePlayerStats();
     agent = GetComponent <NavMeshAgent>();
 }
Example #4
0
 private void Start()
 {
     navMeshAgent = GetComponent <NavMeshAgent>();
     health       = GetComponent <Health>();
 }
Example #5
0
 private void Start()
 {
     _meshAgent = GetComponent <NavMeshAgent>();
 }
Example #6
0
 void Start()
 {
     agent       = GetComponent <NavMeshAgent>();
     m_Rigidbody = GetComponent <Rigidbody>();
 }
Example #7
0
 void Start()
 {
     uziToDrone = GetComponent <NavMeshAgent>();
 }
		private static bool INTERNAL_CALL_Raycast(NavMeshAgent self, ref Vector3 targetPosition, out NavMeshHit hit){}
Example #9
0
 private void Awake()
 {
     agent = GetComponent <NavMeshAgent>();
 }
Example #10
0
 void Start()
 {
     playerPos   = (PlayerPoses)FindObjectOfType(typeof(PlayerPoses));
     agent       = GetComponent <NavMeshAgent>();
     allowToMove = true;
 }
Example #11
0
 public MoveToTarget(EnemyBehaviour Behaviour, NavMeshAgent agent, EnemyBehaviour.MoveState moveState)
 {
     this.behaviour = Behaviour;
     this.agent     = agent;
     this.moveState = moveState;
 }
Example #12
0
 // Start is called before the first frame update
 void Start()
 {
     Agent     = GetComponent <NavMeshAgent>();
     Inventory = GetComponent <Inventory>();
 }
Example #13
0
 void Start()
 {
     agent             = GetComponent <NavMeshAgent>();
     agent.autoBraking = false;
     GotoNextPoint();
 }
Example #14
0
 void Start()
 {
     _navMeshAgent = GetComponent <NavMeshAgent>();
     _botNavPause  = GetComponent <BotNavPause>();
     _nextDodge    = -1;
 }
Example #15
0
 void Start()
 {
     agent = GetComponent <NavMeshAgent>();
     Anim  = GetComponent <Animator>();
     muzzleFlashTimerStart = muzzleflashtime;
 }
 void Awake ()
 {
     _navMeshAgent = this.GetComponentInChildren<NavMeshAgent>();
     _startingPos = _navMeshAgent.transform.position;
 }
		private static bool INTERNAL_CALL_SetDestination(NavMeshAgent self, ref Vector3 target){}
 void Start()
 {
     agent             = GetComponent <NavMeshAgent>();
     anim              = GetComponent <Animator>();
     lastKnownPosition = transform.position;
 }
Example #19
0
 // Start is called before the first frame update
 void Start()
 {
     pillBoi = GetComponent <NavMeshAgent>();
 }
 private void Awake()
 {
     // Get references to components, shouldn't be null because of RequireComponent attribute
     agent    = GetComponent <NavMeshAgent>();
     animator = GetComponent <Animator>();
 }
Example #21
0
 private void Start()
 {
     destination = Player;
     agent       = GetComponent <NavMeshAgent>();
 }
Example #22
0
 // Start is called before the first frame update
 void Start()
 {
     agent = GetComponent<NavMeshAgent>();
     lifePoints = maxLifePoints;
     healthBarSlider.value = 1;
 }
Example #23
0
 public static void ResetMovement(this NavMeshAgent agent)
 {
     agent.ResetPath();
     agent.velocity = Vector3.zero;
 }
Example #24
0
 // Use this for initialization
 void Start()
 {
     target = PlayerManager.instance.player.transform;
     agent  = GetComponent <NavMeshAgent>();
 }
Example #25
0
 // Use this for initialization
 void Start()
 {
     agent = GetComponent <NavMeshAgent> ();
     agent.SetDestination(destination);
 }
Example #26
0
 void Start()
 {
     _nav  = GetComponent <NavMeshAgent>();
     _view = GetComponent <PAIView>();
 }
Example #27
0
 // Start is called before the first frame update
 void Start()
 {
     agent = GetComponent <NavMeshAgent>();
     agent.updateRotation = false;
     agent.updateUpAxis   = false;
 }
Example #28
0
 private void OnValidate()
 {
     _navMeshAgent = GetComponent <NavMeshAgent>();
     _animator     = GetComponent <Animator>();
 }
Example #29
0
 // Start is called before the first frame update
 void Start()
 {
     a = GetComponent <Animator>();
     n = transform.parent.gameObject.GetComponent <NavMeshAgent>();
 }
Example #30
0
 void Start()
 {
     meshAgent = GetComponent <NavMeshAgent>();
 }
Example #31
0
 private static extern bool INTERNAL_CALL_Warp(NavMeshAgent self, ref Vector3 newPosition);
Example #32
0
 public void Awake()
 {
     nav = GetComponent <NavMeshAgent>();
 }
        void Awake()
        {
            _transform = transform;

            _navMeshAgent = this.GetComponentInChildren<NavMeshAgent>();
        }
Example #34
0
 private void Start()
 {
     m_Ani   = GetComponent <Animator>();
     m_Agent = GetComponent <NavMeshAgent>();
     Init();
 }
		private static void INTERNAL_CALL_Move(NavMeshAgent self, ref Vector3 offset){}
Example #36
0
 private void Awake()
 {
     agent    = GetComponent <NavMeshAgent>();
     animator = GetComponentInChildren <Animator>();
 }
		private static bool INTERNAL_CALL_CalculatePathInternal(NavMeshAgent self, ref Vector3 targetPosition, NavMeshPath path){}
Example #38
0
 public ChaseNode(Transform target, NavMeshAgent agent, EnemyAI ai)
 {
     this.target = target;
     this.agent  = agent;
     this.ai     = ai;
 }
Example #39
0
 void Start()
 {
     agent = GetComponent<NavMeshAgent>();
     waypoints = GameObject.FindGameObjectsWithTag("Waypoint");
 }
Example #40
0
 public NavMeshMobMover(NavMeshAgent agent)
 {
     _agent = agent;
 }