// Start is called before the first frame update void Awake() { enemy = GetComponent <Enemy>().data; enemyPlayerInteraction = GetComponent <EnemyPlayerInteraction>(); enemyDeath = GetComponent <EnemyDeath>(); //particleRadius = FindObjectOfType<EnemyRadius>().gameObject; enemy.currHealth = enemy.maxHealth; }
private void Awake() { playerEnergy = FindObjectOfType <PlayerEnergyLvl>(); playerData = FindObjectOfType <Player>().data; playerENnemy = FindObjectOfType <PlayerEnemyInteraction>(); enemy = GetComponent <Enemy>().data; enemyPlayer = GetComponent <EnemyPlayerInteraction>(); if (GameObject.Find("Enemies")) { gameEnd = GameObject.Find("Enemies").GetComponent <GameEnd>(); } }
// Start is called before the first frame update void Start() { enemyMain = gameObject.GetComponentInParent <EnemyPlayerInteraction>(); //detected = enemyMain.attack; }