Esempio n. 1
0
 void Start()
 {
     tw = go.GetComponent<theWay>();
     enemyX = enemy.transform.position.x;
     enemyY = enemy.transform.position.y;
     enemyZ = enemy.transform.position.z;
 }
Esempio n. 2
0
    public void saveAPChanges()
    {
        tw.tst.strTotal += tw.tst.str;
        tw.tst.dexTotal += tw.tst.dex;
        tw.tst.conTotal += tw.tst.con;
        tw.tst.intelTotal += tw.tst.intel;

        tw = twGO.GetComponent<theWay>();

        sld = strBar.GetComponent<Slider> ();
        sld.value = 0;
        sld = strBarTotal.GetComponent<Slider> ();
        sld.value += tw.tst.strTotal;
        tw.tst.str = 0;

        sld = dexBar.GetComponent<Slider> ();
        sld.value = 0;
        sld = dexBarTotal.GetComponent<Slider> ();
        sld.value += tw.tst.dexTotal;
        tw.tst.dex = 0;

        sld = conBar.GetComponent<Slider> ();
        sld.value = 0;
        sld = conBarTotal.GetComponent<Slider> ();
        sld.value += tw.tst.conTotal;
        tw.tst.con = 0;

        sld = intBar.GetComponent<Slider> ();
        sld.value = 0;
        sld = intBarTotal.GetComponent<Slider> ();
        sld.value += tw.tst.intelTotal;
        tw.tst.intel = 0;
    }
Esempio n. 3
0
    public void numEnemys()
    {
        tw = go.GetComponent<theWay>();
        if (tw.sn.lvlAtual % 2 == 0)
        {
            normalEnemys = 0;
            normalEnemys = 1 + (tw.sn.lvlAtual / 2);
        }
        else {
            normalEnemys = 0;
            normalEnemys = 1 + ((tw.sn.lvlAtual - 1) / 2 );
        }

        if (tw.sn.lvlAtual % 5 == 0) {
            miniBoss = 0;
            if(tw.sn.lvlAtual / 5 < 3)miniBoss++;
            if(tw.sn.lvlAtual / 5 > 2) miniBoss++;
        }

        if(tw.sn.lvlAtual % 10 == 0) {
            boss = 0;
            boss++;
        }
        started = true;
        SelFase.SetActive(false);
        InGame.SetActive(true);
        jojo.SetActive(true);
        slotsSkill.SetActive(false);
        panel.SetActive(true);
    }
Esempio n. 4
0
    public void saveAPChanges()
    {
        tw.tst.strTotal += tw.tst.str;
        tw.tst.dexTotal += tw.tst.dex;
        tw.tst.conTotal += tw.tst.con;
        tw.tst.intelTotal += tw.tst.intel;
        tw.tst.lukTotal += tw.tst.luk;

        tw = twGO.GetComponent<theWay>();

        sld = strBar.GetComponent<Slider> ();
        sld.value = 0;
        sld = strBarTotal.GetComponent<Slider> ();
        sld.value += tw.tst.strTotal;
        tw.tst.str = 0;

        sld = dexBar.GetComponent<Slider> ();
        sld.value = 0;
        sld = dexBarTotal.GetComponent<Slider> ();
        sld.value += tw.tst.dexTotal;
        tw.tst.dex = 0;

        sld = conBar.GetComponent<Slider> ();
        sld.value = 0;
        sld = conBarTotal.GetComponent<Slider> ();
        sld.value += tw.tst.conTotal;
        tw.tst.con = 0;

        sld = intBar.GetComponent<Slider> ();
        sld.value = 0;
        sld = intBarTotal.GetComponent<Slider> ();
        sld.value += tw.tst.intelTotal;
        tw.tst.intel = 0;

        sld = lukBar.GetComponent<Slider>();
        sld.value = 0;
        sld = lukBarTotal.GetComponent<Slider>();
        sld.value += tw.tst.lukTotal;
        tw.tst.luk = 0;

        inface.SetActive(true);
        atributos.SetActive(false);
        selFase.SetActive(true);
        theWay.cena = "selFase";
        Debug.Log("mudou cena");
    }
Esempio n. 5
0
    void Update()
    {
        animState = animator.GetCurrentAnimatorStateInfo(0);
        sld = playerLife.GetComponent<Slider>();
        if(sld.value <= 0) {
            sld.value = sld.maxValue;
            tw.ce.started = false;
            tw.ce.enemySummoned = false;
            enemy = GameObject.Find("NormalEnemy(Clone)");
            Destroy(enemy);
            enemy = GameObject.Find("MiniBoss(Clone)");
            Destroy(enemy);
            enemy = GameObject.Find("Boss(Clone)");
            Destroy(enemy);
            selfases.SetActive(true);
            atributos.SetActive(false);
            inGame.SetActive(false);
            inface.SetActive(true);
            jojo.SetActive(false);
            slotSkill.SetActive(true);
            panel.SetActive(false);
        }

        sld = enemyLife.GetComponent<Slider>();
        if(sld.value <= 0) {
            enemy = GameObject.Find("NormalEnemy(Clone)");
            Destroy(enemy);
            enemy = GameObject.Find("MiniBoss(Clone)");
            Destroy(enemy);
            enemy = GameObject.Find("Boss(Clone)");
            Destroy(enemy);
            tw.ce.enemySummoned = false;
            sld = xpBar.GetComponent<Slider>();
            sld.value += tw.ce.xpToEarn;
            if (tw.ce.normalEnemys <= 0 && tw.ce.miniBoss <= 0 && tw.ce.boss <= 0) {
                selfases.SetActive(true);
                atributos.SetActive(false);
                inGame.SetActive(false);
                inface.SetActive(true);
                jojo.SetActive(false);
                slotSkill.SetActive(true);
                panel.SetActive(false);
                tw.ce.started = false;
                sld = playerLife.GetComponent<Slider>();
                sld.value = sld.maxValue;
                if(tw.sn.lvlAtual == tw.sn.lvlMax) tw.sn.lvlMax++;
            }
        }

        txt = playerLifeTxt.GetComponent<Text>();
        sld = playerLife.GetComponent<Slider>();
        txt.text = sld.value + "/" + sld.maxValue;
        tw = twGO.GetComponent<theWay>();
    }
Esempio n. 6
0
 void Start()
 {
     tw = twGO.GetComponent<theWay>();
 }
Esempio n. 7
0
 void Start()
 {
     tw = this.GetComponent<theWay>();
 }
Esempio n. 8
0
 void Start()
 {
     twGO = GameObject.Find("Main Camera");
     tw = twGO.GetComponent<theWay>();
     sld = manaBar.GetComponent<Slider>();
 }
Esempio n. 9
0
 // Use this for initialization
 void Start()
 {
     tw = twGO.GetComponent<theWay>();
     sld = tw.lu.xpBar.GetComponent<Slider>();
 }
Esempio n. 10
0
 void Start()
 {
     go = GameObject.Find("Main Camera");
     tw = go.GetComponent<theWay>();
 }
Esempio n. 11
0
 void Start()
 {
     twGO = GameObject.Find("Main Camera");
     tw = twGO.GetComponent<theWay>();
 }
Esempio n. 12
0
 // Use this for initialization
 void Start()
 {
     //Save ();
     Load ();
     tw = twGO.GetComponent<theWay>();
 }