示例#1
0
    // ========================================================================== //

    // ===================================== //
    // protected - Unity API                 //
    // ===================================== //

    protected override void OnAwake()
    {
        base.OnAwake();

        _pAudioGetter = new CResourceGetter <AudioClip>("Sound");
        for (int i = 0; i < const_iDefault_SoundSlot_PoolingCount; i++)
        {
            MakeSoundSlot();
        }

        _pSlotBGM = FindDisableSlot_OrMakeSlot();
        EventOnSlotPlayClip(_pSlotBGM);
    }
    // ========================================================================== //

    /* public - [Do] Function
     * 외부 객체가 호출(For External class call)*/


    // ========================================================================== //

    /* protected - Override & Unity API         */


    public override void ILocalizeListner_ChangeLocalize(SystemLanguage eLanguage, string strLocalizeValue)
    {
        if (g_pResourceGetter == null)
        {
            g_pResourceGetter = new CResourceGetter <Sprite>("Sprite");
        }

        UnityEngine.UI.Image pImage_UGUI = GetComponent <UnityEngine.UI.Image>();
        if (pImage_UGUI)
        {
            pImage_UGUI.sprite = g_pResourceGetter.GetResource(strLocalizeValue);
        }

    #if NGUI
        _pSprite_NGUI = GetComponent <UISprite>();
        if (_pSprite_NGUI)
        {
            _pSprite_NGUI.sprite = g_pResourceGetter.GetResource_Origin(strText);
        }
#endif
    }