예제 #1
0
 // Use this for initialization
 void Start()
 {
     Sstat        = GetComponent <StatScript> ();
     current_nma  = GetComponent <NavMeshAgent> ();
     current_col  = GetComponent <CapsuleCollider> ();
     current_anim = GetComponent <Animator> ();
     current_rb   = GetComponent <Rigidbody> ();
     Sspawner     = gSpawner.GetComponent <EnemySpawners> ();
     player       = GameObject.FindGameObjectWithTag("Player");
     PlayerStat   = player.GetComponent <StatScript> ();
     DetectZone   = 10;
 }
 public void SuscribeToEnemySpawner(EnemySpawners eSpawn)
 {
     eSpawn.OnEnemySpawn += OnEnemySpawnHandler;
 }
예제 #3
0
 // Start is called before the first frame update
 void Start()
 {
     enemySpawners = FindObjectOfType <EnemySpawners>();
 }