Пример #1
0
    // Update is called once per frame
    void FixedUpdate()
    {
        // this is used for orbs cards //
        if (onexp)
        {
            expcount.value++;

            if (expcount.value == 200)
            {
                countexp = countexp + 1;
            }
        }
        else
        {
            onexp = false;
        }

        //------------------------------------//
        if (expcount.value == 200)
        {
            levelcount     = levelcount + 1;
            leveltext.text = "" + levelcount;
            expcount.value = 0;
            expcount.value++;
            //ply.GetComponent<Playermovement>().nht = +20;
            // ply.GetComponent<Playermovement>().power.maxValue = +5;
            ply.GetComponent <Playermovement>().Speed++;
            if (ply.GetComponent <Playermovement>().Speed > 90)
            {
                ply.GetComponent <Playermovement>().Speed = 80;
            }

            bulforpow.GetComponent <BulletShooting>().ply.power.value = bulforpow.GetComponent <BulletShooting>().ply.power.value + 20 * 5;
            bulexp.amountofloss += 40;
            bulforpow.GetComponent <BulletShooting>().ply.health.value += 5;
        }
    }
Пример #2
0
    void OnTriggerEnter(Collider col)
    {
        if (col.gameObject.tag == "uidk")
        {
            GameObject.FindWithTag("uidk").SetActive(false);
            print("is in1");
            playermov.GetComponent <Playermovement>().health.value = 30;
            Destroy(GameObject.FindWithTag("uidk"));
        }

        if (col.gameObject.tag == "uidk1")
        {
            GameObject.FindWithTag("uidk1").SetActive(false);
            print("is in2");
            playermov.GetComponent <Playermovement>().health.value = 100;
        }

        if (col.gameObject.tag == "uidk2")
        {
            GameObject.FindWithTag("uidk2").SetActive(false);
            print("is in3");
            playermov.GetComponent <Playermovement>().health.value = 500;
        }

        if (col.gameObject.tag == "uiorb1")  // green orb
        {
            GameObject.FindWithTag("uiorb1").SetActive(false);
            expref.onexp = true;
            green        = true;
        }

        if (col.gameObject.tag == "uiorb2")   // blue orb
        {
            GameObject.FindWithTag("uiorb2").SetActive(false);
            expref.onexp = true;
            blue         = true;
        }

        if (col.gameObject.tag == "uiorb3")  // violent orb rare
        {
            GameObject.FindWithTag("uiorb3").SetActive(false);
            expref.onexp = true;
            violet       = true;
        }
        // these cards will not destory

        if (col.gameObject.tag == "uipow1")
        {
            setsonic.GetComponent <setactive>().setact = true;
            print("inpow1");
        }

        if (col.gameObject.tag == "uipow2")
        {
            bullscropt.GetComponent <BulletShooting>().setactive = true;
            print("inpow2");
        }

        if (col.gameObject.tag == "uipow3")
        {
            drawpowref.GetComponent <bullettypes>().setactive = true;
            print("inpow3");
        }
    }