private void Start() { myRigidbody = GetComponent <Rigidbody2D>(); player = FindObjectOfType <PlayerMovement>(); goblinBoss = FindObjectOfType <GoblinBossAttack>().GetComponent <GoblinBossAttack>(); playerPosition = player.transform.position; }
void Start() { goblinBossAttack = GetComponent <GoblinBossAttack>(); startXScale = transform.localScale.x; playerPoistion = player.position; myRigidbody = GetComponent <Rigidbody2D>(); myAnimator = GetComponent <Animator>(); }
private void Start() { myAudioSource = GetComponent <AudioSource>(); myRB = GetComponent <Rigidbody2D>(); firstHealth = health; animator = GetComponent <Animator>(); goblinBoss = FindObjectOfType <GoblinBossAttack>(); }
// Start is called before the first frame update public void SetBoss(GoblinBossAttack goblinBossAttack) { goblinBoss = goblinBossAttack; startNumberOfGrounds = goblinBoss.numberOfGrounds; StartCoroutine(StartAttack()); }