Esempio n. 1
0
    void Update()
    {
//        Debug.Log("(TURE)Global.isMissionCompleted:" + Global.isMissionCompleted + "   @@@@@@@@@@@@@@@@@@@@@@@isDead:" + isDead + "HPMAX:" + hpMax + "HP:" + hp + "HITS:" + myHits);
        if (!isDead)
        {
            if (hp <= 0)
            {
                isDead = true;
            }
            battleHUD.ShowBossHPBar(hp / hpMax, isDead);
        }
        else
        {
            Debug.Log("BOSS DEAD:" + hp);
            GetComponent <Animator>().Play("Die");

            if (Global.OtherData.RoomPlace != "Host" && flag)
            {                                                                                         //0*100=0
                flag = false;
                Int16 percent = (Int16)Math.Round((float)myHits / (float)(myHits + otherHits) * 100); // 整數百分比0~100% 目前是用打擊次數當百分比 如果傷害公式有變動需要修正
                Global.photonService.MissionCompleted((byte)Mission.WorldBoss, 1, percent, "");
                Debug.Log("percent:" + percent);
            }
            transform.parent.parent.GetComponent <Animator>().Play("HoleScale_R");
        }
    }