Example #1
0
 // 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);
 }
Example #2
0
 // 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>();
 }
Example #3
0
 void Start()
 {
     gameManager   = FindObjectOfType <GameManager>();
     spwner        = GameObject.FindGameObjectWithTag("TreasureSpawner").GetComponent <MainSpawner>();
     treasureValue = Random.Range(25, 50);
 }