// Start is called before the first frame update void Start() { currenthealth = Enemymaxhealth; spwner = GameObject.FindGameObjectWithTag("HnDSpawn").GetComponent <MainSpawner>(); collider = GetComponent <Collider2D>(); dropAmount = Random.Range(minDrop, maxDrop); }
// 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>(); }
void Start() { gameManager = FindObjectOfType <GameManager>(); spwner = GameObject.FindGameObjectWithTag("TreasureSpawner").GetComponent <MainSpawner>(); treasureValue = Random.Range(25, 50); }