Example #1
0
    public void ShowDamage(string _strDamage)
    {
        Camera camera = Camera.main;

        GameObject damageText = battleManager.damageTextPool.GetObject();

        damageText.transform.SetParent(battleManager.damagetParentTransfrom, false);
        damageText.transform.localScale = Vector3.one;
        damageText.transform.position   = camera.WorldToScreenPoint(damageTextTransform.position);
        damageText.name = "Damage";

        DamageTextPool damagePool = damageText.GetComponent <DamageTextPool> ();

        damagePool.Damage(_strDamage);
        damagePool.textObjPool = battleManager.damageTextPool;
        damagePool.leftSecond  = 1f;

        battleManager.SortDamageTextLayer();
    }
Example #2
0
    public override void Complate(double _dComplate = 0.0f)
    {
        //Quest
        if (SpawnManager.Instance.repairObject.GetIsFever() == true)
        {
            SpawnManager.Instance.questManager.QuestSuccessCheck(QuestType.E_QUESTTYPE_BIGSUCCESSANDCUSTOMERSUCCESS, 1);
        }

        if (SpawnManager.Instance.repairObject.bIsMissShowUp == false)
        {
            SpawnManager.Instance.questManager.QuestSuccessCheck(QuestType.E_QUESTTYPE_NOMISSCUTOMERSUCCESS, 1);
        }
        else
        {
            SpawnManager.Instance.repairObject.bIsMissShowUp = false;
        }

        if (SpawnManager.Instance.repairObject.bIsWaterUse == false)
        {
            SpawnManager.Instance.questManager.QuestSuccessCheck(QuestType.E_QUESTTYPE_NOWATERUSE, 1);
        }
        else
        {
            SpawnManager.Instance.repairObject.bIsWaterUse = false;
        }


        //Quest
        SpawnManager.Instance.questManager.QuestSuccessCheck(QuestType.E_QUESTTYPE_CUSTOMERSUCCESS, 1);

        //70%이상
        if ((weaponData.dMaxComplate * 0.7) < _dComplate)
        {
            nDay = cPlayerData.GetDay();

            playerController.GuestSuccessed();

            dGold = weaponData.dGold * Math.Pow(1.08, nDay - 1);

            if (cPlayerData.GearEquipmnet != null)
            {
                if (cPlayerData.GearEquipmnet.nIndex == (int)E_BOSS_ITEM.DODOM_FLOWER)
                {
                    int nValue = 0;

                    for (int nIndex = 0; nIndex < SpawnManager.Instance.m_BatchArbait.Length; nIndex++)
                    {
                        if (SpawnManager.Instance.array_ArbaitData [nIndex].bIsAura)
                        {
                            nValue++;
                        }
                    }
                    dGold += dGold * cPlayerData.GearEquipmnet.fBossOptionValue * nValue * 0.01f;
                }
            }

            dGold += dGold * cPlayerData.GetGoldPlusPercent() * 0.01f;

            if (SpawnManager.Instance.shopCash.isConumeBuff_Gold)
            {
                dGold *= 2;
            }

            GameObject damageText = showGoldPool.GetObject();

            damageText.transform.SetParent(goldParent, false);
            damageText.transform.localScale = Vector3.one;
            damageText.transform.position   = cameraObj.WorldToScreenPoint(goldTextPosition.position);
            damageText.name = "Gold";

            DamageTextPool damagePool = damageText.GetComponent <DamageTextPool> ();
            damagePool.Damage("+" + ScoreManager.ScoreInstance.ChangeMoney(dGold));
            damagePool.textObjPool = showGoldPool;
            damagePool.leftSecond  = 0.6f;

            if (cPlayerData.GetEpicOption() != null)
            {
                if (cPlayerData.GetEpicOption().nIndex == (int)E_EPIC_INDEX.E_EPIC_RUBBER_CHICKEN)
                {
                    cPlayerData.GetEpicOption().CheckOption();

                    cPlayerData.SetBigSuccessed();
                }
            }

            ScoreManager.ScoreInstance.GoldPlus(dGold);

            cPlayerData.SetSuccessedGuestCount(cPlayerData.GetSuccessedGuestCount() + 1);
            ScoreManager.ScoreInstance.SetSuccessedGuestCount(cPlayerData.GetSuccessedGuestCount());

            //셩공 손님이 10명 이상 이라면
            if (cPlayerData.GetSuccessedGuestCount() >= 10)
            {
                int nHonor = Mathf.RoundToInt((float)(10 + 1.3 * (nDay - 1)));

                if (SpawnManager.Instance.shopCash.isConumeBuff_Honor)
                {
                    nHonor *= 2;
                }

                ScoreManager.ScoreInstance.HonorPlus(nHonor);

                //날짜 초기화
                cPlayerData.SetSuccessedGuestCount(0);

                ScoreManager.ScoreInstance.SetSuccessedGuestCount(0);

                //날짜를 1일 추가
                SpawnManager.Instance.SetDayInitInfo(cPlayerData.GetDay() + 1);
            }
        }

        m_bIsRepair = true;
    }