//[SerializeField]private PlayerController pc; //private DinoBossScript dino; // Start is called before the first frame update void Start() { anim = GetComponent <Animator>(); ec = GameObject.FindGameObjectWithTag("MyEnemy").GetComponent <EnemyController>(); swing = GetComponent <AudioSource>(); erc = GameObject.FindGameObjectWithTag("MyEnemy").GetComponent <EnemyRangeController>(); ega = GameObject.FindGameObjectWithTag("MyEnemy").GetComponent <EnenyGetAttacked>(); spu = GameObject.FindGameObjectWithTag("PowerUpTag").GetComponent <SwordPowerUp>(); //dino = GameObject.FindGameObjectWithTag("MyEnemy").GetComponent<DinoBossScript>(); }
// Start is called before the first frame update void Start() { anim = GetComponent <Animator>(); spr = GetComponent <SpriteRenderer>(); boxc = GetComponent <BoxCollider2D>(); rb = GetComponent <Rigidbody2D>(); pc = GetComponent <PlayerController>(); pa = GetComponent <PlayerAttack>(); isRunning = false; playerDead = false; ec = GameObject.FindGameObjectWithTag("MyEnemy").transform; spu = GameObject.FindGameObjectWithTag("PowerUpTag").GetComponent <SwordPowerUp>(); }
private void Start() { spu = GameObject.FindGameObjectWithTag("PowerUpTag").GetComponent <SwordPowerUp>(); anim = GetComponent <Animator>(); rb = GetComponent <Rigidbody2D>(); }