// 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; }
// Start is called before the first frame update void Start() { enemySpawners = FindObjectOfType <EnemySpawners>(); }