// Use this for initialization
    void Start()
    {
        cloud          = FindObjectOfType <MegaCloud>();
        startTransform = transform;

        patrolScript = GetComponentInChildren <BossPatrolMan>();

        playerIn = FindObjectOfType <NewPlayerInBossRoom>();

        anim = GetComponentInChildren <Animator>();

        playerInRange = GetComponent <CheckPlayerInRange>();

        bossHealth = GetComponentInChildren <EnemyHealthMid>();


        randoInt = Random.Range(min, max);
        randoInt++;

        if (startFight == true)
        {
            patrolScript.canWalk = true;
        }
        StartCoroutine("ShotDelay");
    }
 // Use this for initialization
 void Start()
 {
     health            = GetComponent <EnemyHealthMid>();
     currentBossHealth = GetComponent <EnemyHealthMid>().enemyHealth;
     updatedBossHealth = currentBossHealth;
     range             = FindObjectOfType <CheckPlayerInRange>();
     playerlife        = FindObjectOfType <HealthManager>();
 }
 // Use this for initialization
 void Start()
 {
     anim              = gameObject.GetComponent <Animator>();
     inRangeScript     = GetComponent <CheckPlayerInRange>();
     enemyPatrolScript = GetComponent <EnemyPatrol>();
     moveSpeedStart    = enemyPatrolScript.moveSpeed;
     HealthScript      = GetComponent <EnemyHealthMid>();
     enemyHealthStart  = HealthScript.enemyHealth;
     enemyHealthBuff   = enemyHealthStart + enemyHealthStart;
 }
Exemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     bossFight         = FindObjectOfType <fireBossFight>();
     health            = GetComponent <EnemyHealthMid>();
     currentBossHealth = GetComponent <EnemyHealthMid>().enemyHealth;
     updatedBossHealth = currentBossHealth;
     range             = FindObjectOfType <CheckPlayerInRange>();
     playerlife        = FindObjectOfType <HealthManager>();
     anim = gameObject.GetComponent <Animator>();
 }
Exemplo n.º 5
0
    // Use this for initialization
    void Start()
    {
        ribo2d = GetComponent <Rigidbody2D>();

        player            = GameObject.FindGameObjectWithTag("Player");
        cloud             = FindObjectOfType <MegaCloud>();
        enemyHealthScript = FindObjectOfType <EnemyHealthMid>();
        enemyRb2d         = GetComponent <Rigidbody2D>();

        if (cloud.inWoodLevel)
        {
            damageToGive = damageToGive / 2;
        }
        if (cloud.inFireLevel)
        {
            damageToGive = damageToGive * 2;
        }

        if (player.transform.localScale.x < 0)
        {
            speed = -speed;
            transform.localScale = new Vector3(-1, 1, 1);
        }
    }