Exemplo n.º 1
0
 void Death()
 {
     //被破壞特效(未寫)-----------------
     originalObj.enabled = false;
     destoryObj.enabled  = true;
     deadManager.ifDead(true);
     MatchTimeManager.SetCountDownNoCancel(ReBorn, delayToReBorn);
     MatchTimeManager.ClearThisTask(modifyIndex);
     closeHpBar();
 }
Exemplo n.º 2
0
    ///////////////////////////////////////蓋塔防相關
    public void NeedToUpdate()
    {
        if (nowBuilding && haveTower)
        {
            if (nowSelect)
            {
                FindCorrectPos();
            }

            if (!nowBuild)
            {
                if (Input.GetMouseButtonDown(1))
                {
                    print("取消建造");
                    cancelSelect();
                    _start = false;
                }

                if (_start && !nowSelect)
                {
                    goBuild();
                }
            }
            else
            {
                if ((Input.GetKeyDown(KeyCode.Escape)) || Input.GetMouseButtonDown(1) || playerScript.deadManager.checkDead)
                {
                    nowBuild = false;
                    if (cancelBuildIndex != 0)
                    {
                        MatchTimeManager.ClearThisTask(cancelBuildIndex);
                    }
                    cancelBuildIndex = 0;
                    playerScript.switchScaffolding(false);
                    cancelPunish(0.8f);
                    closeScaffolding();
                    closeTurretToBuild();
                    playerScript.stopAnything_Switch(false);
                    HintScript.CreatHint("中斷建造");
                }
            }
        }
    }