Unity¤Ë´ØÏ¢¤¹¤ëµ­»ö¤Ç¤¹

¡¡·Ð¸³Ãͤò²Ã»»¤·¡¢°ìÄêÃͤòĶ¤¨¤¿¾ì¹ç¤Ë¥ì¥Ù¥ë¥¢¥Ã¥×¤ò¹Ô¤¦µ¡Ç½¤Î¼ÂÁõÎã¤Ç¤¹¡£



Àß·×


¡¡³ÍÆÀ¤·¤¿·Ð¸³ÃͤÎÎ̤ˤè¤Ã¤Æ¤ÏÊ£¿ô²ó¤Î¥ì¥Ù¥ë¥¢¥Ã¥×¤¬È¯À¸¤¹¤ë²ÄǽÀ­¤â¤¢¤ë¤¿¤á¡¢
¤½¤¦¤¤¤Ã¤¿¥±¡¼¥¹¤Ë¤âÂбþ¤·¤¿¥¢¥×¥í¡¼¥ÁÊýË¡¤Ë¤Ê¤ê¤Þ¤¹¡£


¥Ç¡¼¥¿¥Æ¡¼¥Ö¥ë¤ÎºîÀ®


¡¡Json ¥Ç¡¼¥¿¤ä¥¹¥×¥ì¥Ã¥É¥·¡¼¥È¤Ê¤É¤Ç·Ð¸³Ãͤȥì¥Ù¥ë¤Î¥Ç¡¼¥¿¥Æ¡¼¥Ö¥ë¤òºîÀ®¤·¤Þ¤¹¡£
¥ì¥Ù¥ë¤Ë±þ¤¸¤ÆÊѲ½¤¹¤ë¸ÇÄꥹ¥Æ¡¼¥¿¥¹¤¬¤¢¤ë¾ì¹ç¤Ë¤Ï¹ç¤ï¤»¤ÆÍÑ°Õ¤·¤Æ¤ª¤¯¤ÈÊØÍø¤Ç¤¹¡£

¡¡²¼µ­¤Î¥Æ¡¼¥Ö¥ëÎã¤Ï¡¢¥ì¥Ù¥ë¡¢·Ð¸³ÃÍ¡¢Î߷׷и³ÃÍ¡¢¥ì¥Ù¥ë¤Ë¤è¤ë Hp ¤Ç¤¹¡£





CharaLevelManager ¥¯¥é¥¹¤ÎºîÀ®



<= ¥¯¥ê¥Ã¥¯¤¹¤ë¤È³«¤­¤Þ¤¹



PetLevelManager



<= ¥¯¥ê¥Ã¥¯¤¹¤ë¤È³«¤­¤Þ¤¹



¼ÂÁõÎã


¡¡·Ð¸³Ãͤβû»ÍѤΥ᥽¥Ã¥É¤Î¸Æ¤Ó½Ð¤·½èÍý¤Î¼ÂÁõ¤ò¹Ô¤¤¤Þ¤¹¡£

¡¡¥×¥ì¥¤¥ä¡¼Â¦¤Ë¼ÂÁõ¤¹¤ëÊýË¡¤È¡¢Å¨Â¦¤Ë¼ÂÁõ¤¹¤ëÊýË¡¤Î£²¤Ä¤Î¥¢¥×¥í¡¼¥ÁÊýË¡¤¬¹Í¤¨¤é¤ì¤Þ¤¹¡£

¡¡
    /// <summary>
    /// EnemyBase ¤ÎŨ¤Î Hp ¤¬ 0 ¤Ë¤Ê¤Ã¤¿¤È¤­¤Ë¼Â¹Ô¤µ¤ì¤ë
    /// </summary>
    /// <param name="exp"></param>
    public async void AddExpToActivePets(int exp) {

        // ·Ð¸³ÃͤËÂФ¹¤ë·¸¿ô¤ò»»½Ð¤·¡¢¥Ú¥Ã¥È¤Î·Ð¸³Ãͤòµá¤á¤ë(¸½ºß¤Ï¥×¥ì¥¤¥ä¡¼¤Î³ÍÆÀÃͤΠ30¡ó)
        int percentage = TitleDataManager.instance.ContentControllerMasterData.pet_exp_rate;
        double petExp = exp * (percentage / 100.0);

        Debug.Log($"¥Ú¥Ã¥È¤Î³ÍÆÀ·Ð¸³ÃÍ : {(int)petExp}");

        for (int i = 0; i < summonPets.Length; i++) {

            // ¾¤´­Ãæ¤Î¥Ú¥Ã¥È¤Î¾ì¹ç
            if (summonPets[i] != null) {

                // ·Ð¸³ÃͲû»¤·¡¢¥ì¥Ù¥ë¥¢¥Ã¥×̵ͭ¤ò¤â¤é¤¦
                bool isLevelUp = await PetLevelManager.AddPetExp((int)petExp, summonPets[i].currentPetMasterData.pet_id);

                // ¥ì¥Ù¥ë¥¢¥Ã¥×¤·¤¿¾ì¹ç
                if (isLevelUp) {

                    // ¥ì¥Ù¥ë¥¢¥Ã¥×¸å½èÍý(Hp Á´²óÉü¡¢¥¨¥Õ¥§¥¯¥È)
                    ProcessAfterLevelUp(i, summonPets[i]);
                }
            }
        }
    }

    /// <summary>
    /// ¥ì¥Ù¥ë¥¢¥Ã¥×¸å½èÍý(Hp Á´²óÉü¡¢¥¨¥Õ¥§¥¯¥È)
    /// </summary>
    /// <param name="buttonIndex"></param>
    /// <param name="pet"></param>
    public void ProcessAfterLevelUp(int buttonIndex, Pet pet) {
        // Hp Á´²óÉü
        pet.HealLife(pet.MaxHp);

        // ¥¨¥Õ¥§¥¯¥ÈºÆÀ¸¤Î½àÈ÷
        PrepareLevelUpPetEffect(buttonIndex, pet);
    }

    /// <summary>
    /// ¥¨¥Õ¥§¥¯¥ÈºÆÀ¸¤Î½àÈ÷
    /// </summary>
    /// <param name="buttonIndex"></param>
    /// <param name="pet"></param>
    public void PrepareLevelUpPetEffect(int buttonIndex, Pet pet) {
        // ¥ª¥Ö¥¸¥§¥¯¥È¥×¡¼¥ë¤«¤é¥ì¥Ù¥ë¥¢¥Ã¥×ÍѤΥ¨¥Õ¥§¥¯¥È¤ò¼è¤ê½Ð¤·
        (EffectPlayerBase levelUpEffect, float duraion) = EffectManager.instance.GetEffect(ConstData.PET_LEVEL_UP_EFFECT_INDEX);

        // ¥¨¥Õ¥§¥¯¥È¤òɽ¼¨¤¹¤ë°ÌÃÖ¤òÄ´À°
        Vector3 effectPos = new(0, ConstData.LEVEL_UP_EFFECT_START_POS_Y, 0);

        // ¥Ú¥Ã¥È¤Î¾å¤ÇºÆÀ¸
        levelUpEffect.PlayEffect(duraion, pet.transform.position + effectPos, token).Forget();

        // PetButtonManager ¦¤Ë¤Æ¹ØÆɤ·¤Æ¤¤¤ë OnLevelUpPet ¤Ø buttonIndex ¤òÄÌÃΤ·¡¢¥Ú¥Ã¥È¤Î¥Ü¥¿¥ó¤Î¾å¤Ë¤â¥¨¥Õ¥§¥¯¥È¤ò½Ð¤¹
        OnLevelUpPet.OnNext(buttonIndex);
    }

¥³¥á¥ó¥È¤ò¤«¤¯


¡Öhttp://¡×¤ò´Þ¤àÅê¹Æ¤Ï¶Ø»ß¤µ¤ì¤Æ¤¤¤Þ¤¹¡£

ÍøÍѵ¬Ìó¤ò¤´³Îǧ¤Î¤¦¤¨¤´µ­Æþ²¼¤µ¤¤

Menu


´ðÁÃ

µ»½Ñ/Ãμ±(¼ÂÁõÎã)

3D¥¢¥¯¥·¥ç¥ó¥²¡¼¥à

2D¤ª¤Ï¤¸¤­¥²¡¼¥à(ȯŸÊÔ)

2D¶¯À©²£¥¹¥¯¥í¡¼¥ë¥¢¥¯¥·¥ç¥ó(ȯŸÊÔ)

2D¥¿¥Ã¥×¥·¥å¡¼¥Æ¥£¥ó¥°(³ÈÄ¥ÊÔ)

¥ì¡¼¥¹¥²¡¼¥à(È´¿è)

2DÊüÃÖ¥²¡¼¥à(ȯŸÊÔ)

3D¥ì¡¼¥ë¥¬¥ó¥·¥å¡¼¥Æ¥£¥ó¥°(±þÍÑÊÔ)

3Dæ½Ð¥²¡¼¥à(È´¿è)

2D¥ê¥¢¥ë¥¿¥¤¥à¥¹¥È¥é¥Æ¥¸¡¼

3D¥¿¥Ã¥×¥¢¥¯¥·¥ç¥ó(NavMeshAgent »ÈÍÑ)

2D¥È¥Ã¥×¥Ó¥å¡¼¥¢¥¯¥·¥ç¥ó(¥«¥¨¥ë¤Î°Ù¤Ë¡Á¡¢¥Ü¥³¥¹¥«¥¦¥©¡¼¥ºÉ÷)

VideoPlayer ¥¤¥Ù¥ó¥ÈϢư¤Î¼ÂÁõÎã

VideoPlayer ¥ê¥¹¥ÈÆ⤫¤é¥à¡¼¥Ó¡¼ºÆÀ¸¤Î¼ÂÁõÎã(ȯŸ)

AR ²èÁüÉÕ¤­¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®¤Î¼ÂÁõÎã

AR ¥ê¥¹¥ÈÆ⤫¤éÀ¸À®¤Î¼ÂÁõÎã(ȯŸ)

2D¥È¥Ã¥×¥Ó¥å¡¼¥¢¥¯¥·¥ç¥ó(¥µ¥Ð¥¤¥Ð¡¼É÷)

private



¤³¤Î¥µ¥¤¥ÈÆâ¤ÎºîÉʤϥæ¥Ë¥Æ¥£¤Á¤ã¤ó¥é¥¤¥»¥ó¥¹¾ò¹à¤Î¸µ¤ËÄ󶡤µ¤ì¤Æ¤¤¤Þ¤¹¡£

´ÉÍý¿Í/Éû´ÉÍý¿Í¤Î¤ßÊÔ½¸¤Ç¤­¤Þ¤¹