void Start() { plr = GameObject.FindGameObjectWithTag("Player"); plrH = plr.GetComponent <playerHealth>(); anim = this.gameObject.GetComponent <Animator>(); gm = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameManager>(); enemyMove = GetComponentInParent <enemymovement>(); playerMove = plr.GetComponent <Player>(); }
// Start is called before the first frame update void Start() { currenthealth = Enemymaxhealth; spwn = GameObject.FindGameObjectWithTag("SkelSpawner").GetComponent <MainSpawner>(); collider = GetComponent <Collider2D>(); dropAmount = Random.Range(minDrop, maxDrop); anim = this.gameObject.GetComponent <Animator>(); move = this.gameObject.GetComponent <enemymovement>(); }
// Start is called before the first frame update void Start() { enemyscript = enemy.GetComponent <enemymovement>(); }