Exemple #1
0
    //[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>();
    }
Exemple #2
0
 // 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>();
 }
Exemple #3
0
 private void Start()
 {
     spu  = GameObject.FindGameObjectWithTag("PowerUpTag").GetComponent <SwordPowerUp>();
     anim = GetComponent <Animator>();
     rb   = GetComponent <Rigidbody2D>();
 }