예제 #1
0
 private void Start()
 {
     // get the components on the object we need ( should not be null due to require component so no need to check )
     agent                = GetComponent <UnityEngine.AI.NavMeshAgent>();
     character            = GetComponent <ThirdPersonEnemy>();
     enemy                = GetComponent <Zombie>();
     agent.updateRotation = false;
     agent.updatePosition = true;
 }
예제 #2
0
 // Start is called before the first frame update
 void Start()
 {
     player              = GameObject.FindGameObjectWithTag("Player");
     aIEnemyControl      = GetComponent <AIEnemyControl>();
     thirdPersonEnemy    = GetComponent <ThirdPersonEnemy>();
     m_Animator          = GetComponent <Animator>();
     attackSFX           = GetComponent <AudioSource>();
     FistCol             = fistComponent;
     ArmCol              = armComponent;//GameObject.FindGameObjectWithTag("Fist");
     currentHealthPoints = maxHealthPoints;
 }
예제 #3
0
 // Start is called before the first frame update
 void Start()
 {
     player           = GameObject.FindGameObjectWithTag("Player");
     aIEnemyControl   = GetComponent <AIEnemyControl>();
     thirdPersonEnemy = GetComponent <ThirdPersonEnemy>();
     m_Animator       = GetComponent <Animator>();
     attackSFX        = this.GetComponent <AudioSource>();
     projectileToUse.SetActive(true);
     tp = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>();
     gm = GameObject.FindGameObjectWithTag("gamemanager").GetComponent <gamemanager>();
 }