// 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()
    {
        theAM = FindObjectOfType <AudioManager>();


        cloud = FindObjectOfType <MegaCloud>();

        playerInEndZone = false;


        if (cloud.inFireLevel)
        {
            inFire = true;
        }
        if (cloud.inWoodLevel)
        {
            inWood = true;
        }
        if (cloud.inWaterLevel)
        {
            inWater = true;
        }
        if (cloud.inFinalLevel)
        {
            inFinal = true;
        }
    }
    // Use this for initialization
    void Start()
    {

        player = FindObjectOfType<Player>();
        cloud = FindObjectOfType<MegaCloud>();
        player.enabled = false;

    }
Exemple #4
0
    // Use this for initialization
    void Start()
    {
        player = FindObjectOfType <Player>();

        theAM = FindObjectOfType <AudioManager>();

        cloud = FindObjectOfType <MegaCloud>();

        levelLoadering = FindObjectOfType <LevelLoaderCloudCheck>();
    }
 // Use this for initialization
 void Start()
 {
     cloud = FindObjectOfType <MegaCloud>();
     if (cloud.inWaterLevel)
     {
         damageToGive = damageToGive / 2;
     }
     if (cloud.inWoodLevel)
     {
         damageToGive = damageToGive * 2;
     }
 }
    // Use this for initialization
    void Start()
    {
        newSwitchCounterScript = GetComponent <NewLevelSelectMoverControllerBetter>();
        player   = FindObjectOfType <Player>();
        theCloud = FindObjectOfType <MegaCloud>();



        if (theCloud.fireFinished_Cloud && theCloud.waterFinished_Cloud && theCloud.woodFinished_Cloud)
        {
            theCloud.finalUnlocked_Cloud = true;
        }

        CheckFinalUnlockedNormalMeans();
    }
Exemple #7
0
    void start()
    {
        cloud       = FindObjectOfType <MegaCloud>();
        player      = FindObjectOfType <Player>();
        fireSlider  = GetComponent <GameObject>();
        waterSlider = GetComponent <GameObject>();
        grassSlider = GetComponent <GameObject>();

        energyTankManager = FindObjectOfType <EnergyTankManager>();
        healthManager     = FindObjectOfType <HealthManager>();

        waterSlider.SetActive(false);
        fireSlider.SetActive(false);
        grassSlider.SetActive(false);
        Tanks.text = newTanks.ToString();
    }
    // Use this for initialization
    void Start()
    {
        edge   = GetComponent <EdgeCollider2D>();
        render = GetComponent <SpriteRenderer>();
        cloud  = FindObjectOfType <MegaCloud>();
        turnOff();

        if (cloud.inFireLevel)
        {
            damageToGive = damageToGive / 2;
        }
        if (cloud.inWaterLevel)
        {
            damageToGive = damageToGive * 2;
        }
    }
Exemple #9
0
    // Update is called once per frame
    void Update()
    {
        cloud = FindObjectOfType <MegaCloud>();
        if (isPaused)
        {
            weaponMenuCanvas.SetActive(true);

            Time.timeScale = 0f;
            player.enabled = false;
        }
        else
        {
            weaponMenuCanvas.SetActive(false);
            Time.timeScale = 1f;
            player.enabled = true;
        }


        if (Input.GetButtonDown("Pause"))
        {
            isPaused = !isPaused;
        }
    }
Exemple #10
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);
        }
    }