Ejemplo n.º 1
0
    }//贤者之石,可用

    public void DoubleedgedStaff()
    {
        Debug.Log(magiccore.getATK());
        magiccore.setATK(magiccore.getATK() + 2);

        magiccore.setDEF(magiccore.getDEF() - 1);
    } //双刃杖,可用
Ejemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        //显示ATK和DEF
        ATK.GetComponent <Text>().text = "ATK: " + magic.getATK().ToString();
        DEF.GetComponent <Text>().text = "DEF: " + magic.getDEF().ToString();
        HP.GetComponent <Text>().text  = "HP:" + magic.getHP().ToString();
        //测试monster,获取血量等
        monster0.GetComponentInChildren <Text>().text = monster0.GetComponent <Monster>().monsterHP.ToString();
        //绘制连线颜色
        drawLineColor();

        //设定skill的内容
        skillContent();

        //设定skill的状态
        skillStatus();

        //检查线上的信息
        lineStatus();

        //监听函数
        if (magic.getFlag() == ClickFlag.defencer)
        {
            startButton.GetComponent <Image>().color = Color.green;
        }
        else
        {
            startButton.GetComponent <Image>().color = Color.red;
        }

        //说明框位置跟随
        showState.transform.position =
            new Vector3((int)Input.mousePosition.x - (int)width * showState.transform.localScale.x / 2 + 0.1f,
                        (int)Input.mousePosition.y + (int)height * showState.transform.localScale.y / 2 + 0.1f, 0);

        //检测怪物是否活着
        for (int i = 0; i < 4; ++i)
        {
            if (magic.isMonsterLive(i))
            {
                break;
            }
            if (i == 3 && !isShow)
            {
                gameOver.SetActive(true);
                GameObject.Find("tool").GetComponentInChildren <Text>().text = Ibuff.iName.ToString();
                isShow = true;
            }
        }
        if (overCount == 0)
        {
            overCount = -1;
            MapMain.Instance.SceneEnd(true);
            canvas.SetActive(false);
        }
    }
Ejemplo n.º 3
0
    }//烈焰之心,可用

    public void IceHeart(Move m)
    {
        if (magiccore.getPoint(m.pEnd).color == PointColor.blue)
        {
            doingbuff.count += 1;
        }
        if (doingbuff.count == doingbuff.maxCount)
        {
            magiccore.setDEF(magiccore.getDEF() + 1);
            doingbuff.count = 0;
        }
    }//寒霜之心,可用
Ejemplo n.º 4
0
 /// <summary>
 /// 均衡之息,获得一点攻击和一点防御
 /// </summary>
 /// <param name="m"></param>
 void BalanceBreath(ref Magic m)
 {
     magicCore.setDEF(magicCore.getDEF() + 1);
     magicCore.setATK(magicCore.getATK() + 1);
 }