Exemple #1
0
    IEnumerator Cor_Picture()
    {
        m_bProcess = true;
        yield return(new WaitForEndOfFrame());

        JHGameData_Mng.I.SetCycle(true);


        yield return(StartCoroutine(Cor_Te()));

        yield return(new WaitForEndOfFrame());

        AutoFade.LoadFade(0.2f, 0.3f, Color.white);
        tex.Apply(true);
        CSSoundMng.I.Play("CameraShot");
        m_pObject = CSPrefabMng.I.CreatePrefab(this.gameObject, "2_Objects/GameUI/GameUI_PictureTexture", "PictureTexter");
        m_pObject.GetComponent <Animation>().Play("Test2_Picture");
        m_pTexture             = m_pObject.GetComponent <UITexture>();
        m_pTexture.mainTexture = tex;

        yield return(new WaitForSeconds(1.5f));

        CSPrefabMng.I.CreatePrefab(transform.parent.gameObject, "2_Objects/GameUI/GameUI_SharePopup", "GameUI_SharePopup");

        yield return(null);
    }
Exemple #2
0
    IEnumerator Cor_Start()
    {
        CSSoundMng.I.AllStop();
        CSSoundMng.I.Play("Lighting");
        Color pColor = Color.black;

        pColor.a = 0.6f;
        AutoFade.LoadFade(0.3f, 0.3f, pColor);
        yield return(new WaitForSeconds(0.9f));

        pColor.a = 0.8f;
        AutoFade.LoadFade(0.3f, 0.3f, pColor);
        yield return(new WaitForSeconds(0.7f));

        pColor.a = 1.0f;
        AutoFade.LoadFade(0.6f, 0.5f, pColor);
        yield return(new WaitForSeconds(0.6f));

        Black();
        yield return(new WaitForSeconds(0.3f));

        CSSoundMng.I.Play("EndingSong");
        m_pParticle.gameObject.SetActive(true);
        StartCoroutine(Tropimove());

        yield return(new WaitForSeconds(3.0f));

        // m_pParticle.m_pParticle.Stop();
        Vector3 sfdfa = Vector3.zero;

        for (float i = 0.0f; i < 1.0f; i += Time.deltaTime)
        {
            sfdfa.y = Mathf.Lerp(sfdfa.y, 200.0f, 5.0f * Time.deltaTime);
            m_pCaptine.transform.localPosition  = sfdfa;
            m_pParticle.transform.localPosition = sfdfa;
            yield return(null);
        }
        m_pFlabel.gameObject.SetActive(true);

        //     m_pParticle.Enter();
        //   m_pParticle.Create(Vector3.zero);
        yield return(new WaitForSeconds(9.0f));

        m_PEnd.gameObject.SetActive(true);
        while (true)
        {
            if (Input.GetMouseButtonUp(0))
            {
                CSSoundMng.I.AllStop();
                ChoGiHwa();
                break;
            }
            yield return(null);
        }


        yield return(null);
    }
Exemple #3
0
    void OnTriggerEnter2D(Collider2D other)
    {
        //if(m_eState!=E_HEROSTATE.E_STURN)
        //  {
        JHMoney_Root pMoney = other.GetComponent <JHMoney_Root>();

        if (pMoney != null)
        {
            if (pMoney._Active == true)
            {
                if (pMoney._Magnet == false)
                {
                    m_fCurrPower += m_fPlusPower;
                    if (m_fCurrPower >= m_fMaxPower)
                    {
                        if (JHGameData_Mng.I._Vibe == true)
                        {
                            Handheld.Vibrate();
                        }
                        float fRecovery = (JHGame_MainLayer.I._Hero.pSrc._MaxHp * 3) / 100.0f;
                        //   Debug.Log("Recovery + " + fRecovery);
                        JHGame_MainLayer.I._Hero.pSrc.Recovery_Hp(fRecovery);

                        CSSoundMng.I.Play("FeverBoom");
                        CSSoundMng.I.Play("Neco1");
                        JHGame_MainLayer.I.m_pEffect_Mng.CreateEffect_PT_VortexAir(m_stPos);
                        JHGame_MainLayer.I.m_pEffect_Mng.CreateEffect_CirclePang(m_stPos);
                        JHGame_MainLayer.I.m_pMoney_Mng.AllMagnet();
                        AutoFade.LoadFade(0.1f, 0.1f, Color.white);
                        m_fCurrPower = 0.0f;
                    }
                }


                EatMoney(pMoney.GetMoneyWorthPay());
                // EatMoney(pMoney._Gold);
                pMoney.Eated();
                return;
            }
        }
        //  }


        JHEnemy_Root pEnemy = other.GetComponent <JHEnemy_Root>();

        if (pEnemy != null)
        {
            if (pEnemy._Active == true)
            {
                // Debug.Log(pEnemy._Class);
                switch (pEnemy._Class)
                {
                case E_ENEMY_CLASS.E_BALL:
                    if (pEnemy._Position.y < m_stPos.y - 15.0f)
                    {
                        return;
                    }
                    pEnemy.HitPlayer();
                    Hited(pEnemy._Damege);
                    JHUserData_Mng.I.m_pUserData.PlusData("_HitBallCount");
                    JHUserData_Mng.I.m_pUserData.PlusData("_Hidden_HitBallCombo");
                    return;

                case E_ENEMY_CLASS.E_COW:
                    pEnemy.HitPlayer();
                    Hited(pEnemy._Damege);
                    JHUserData_Mng.I.m_pUserData.PlusData("_HitCowCount");
                    return;

                case E_ENEMY_CLASS.E_ROCK:
                    if (pEnemy._Position.y < m_stPos.y - 15.0f)
                    {
                        return;
                    }
                    pEnemy.HitPlayer();
                    Hited(pEnemy._Damege);
                    JHUserData_Mng.I.m_pUserData.PlusData("_HitBallCount");
                    JHUserData_Mng.I.m_pUserData.PlusData("_Hidden_HitBallCombo");
                    return;

                case E_ENEMY_CLASS.E_CAR:
                    pEnemy.HitPlayer();
                    Hited(pEnemy._Damege);
                    JHUserData_Mng.I.m_pUserData.PlusData("_HitCowCount");
                    return;

                case E_ENEMY_CLASS.E_HOMI:
                    if (pEnemy._Position.y < m_stPos.y - 15.0f)
                    {
                        return;
                    }
                    pEnemy.HitPlayer();
                    Hited(pEnemy._Damege);
                    JHUserData_Mng.I.m_pUserData.PlusData("_HitBallCount");
                    JHUserData_Mng.I.m_pUserData.PlusData("_Hidden_HitBallCombo");
                    return;
                }
            }
        }

        if (m_eState != E_HEROSTATE.E_STURN)
        {
            JHItem_Root pItem = other.GetComponent <JHItem_Root>();
            if (pItem != null)
            {
                if (pItem._Active == true)
                {
                    pItem.Eated();
                    return;
                }
            }
        }
    }