Esempio n. 1
0
 private void Start()
 {
     _maxHealth = _health;
     _selfAnim  = gameObject.GetComponent <Animator>();
     _nav       = gameObject.GetComponent <NavMeshAgent>();
     _nav.speed = _speed;
     _gm        = GameObject.Find("GameManager").GetComponent <gm_Primary>();
 }
Esempio n. 2
0
 void Start()
 {
     _goal   = GameObject.Find("player_01").transform;
     _parent = GameObject.FindGameObjectWithTag("epandprefab").transform;
     gm      = GameObject.Find("GameManager").GetComponent <gm_Primary>();
     this.transform.parent = _parent;
     _agent             = GetComponent <NavMeshAgent>();
     _agent.destination = _goal.position;
 }
Esempio n. 3
0
 void Start()
 {
     _goalTransform    = GameObject.Find("player_01").transform;
     _selfObstacle     = gameObject.GetComponent <NavMeshObstacle>();
     _moveLogic        = GameObject.Find("GameManager").GetComponent <gm_Surround>();
     _subGoalTransform = _moveLogic.RequestAIDestination();
     _selfTransform    = gameObject.GetComponent <Transform>();
     _goalAnim         = GameObject.Find("player_01").GetComponent <Animator>();
     _selfAnim         = gameObject.GetComponent <Animator>();
     _parentTransform  = GameObject.FindGameObjectWithTag("epandprefab").transform;
     _gm                   = GameObject.Find("GameManager").GetComponent <gm_Primary>();
     _selfStatus           = gameObject.GetComponent <enemy_stats_base>();
     this.transform.parent = _parentTransform;
     _agent                = GetComponent <NavMeshAgent>();
 }