Exemple #1
0
 virtual public void OnScrollView_ClickItem(CUGUIScrollItem pScrollItem, IScrollItem_Data pScrollData, Enum_InputName eButtonName)
 {
     if (CheckDebugFilter(EDebugFilter.Debug_Level_Core))
     {
         Debug.Log(ConsoleProWrapper.ConvertLog_ToCore(pScrollItem.name + "OnScrollView_ClickItem - Data : " + pScrollData + " Button Name : " + eButtonName), pScrollItem);
     }
 }
    // ========================================================================== //

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

    public void DoSet_MoveIsLock(bool bLock)
    {
        if (CheckDebugFilter(EDebugFilter.Debug_Level_Core))
        {
            Debug.Log(ConsoleProWrapper.ConvertLog_ToCore(name + " SetMoveUnlock " + bLock), this);
        }

        p_bMoveIsLock = bLock;
    }
Exemple #3
0
    // ========================================================================== //

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

    public CEffect DoPlayEffect(string strEffectEvent = "")
    {
        if (CheckDebugFilter(EDebugFilter.Debug_Level_Core))
        {
            Debug.Log(ConsoleProWrapper.ConvertLog_ToCore(" DoPlayEffect - " + strEffectEvent + " Is Contain : " + _mapEffectPlayInfo.ContainsKey(strEffectEvent)), this);
            return(null);
        }

        if (_mapEffectPlayInfo.ContainsKey(strEffectEvent) == false)
        {
            return(null);
        }

        SEffectPlayInfo pEffectPlayInfo = _mapEffectPlayInfo[strEffectEvent];

        return(PlayEffect(pEffectPlayInfo.GetRandomEffect()));
    }
Exemple #4
0
    public CEffect DoPlayEffect(string strEffectEvent, Vector3 vecPos)
    {
        if (CheckDebugFilter(EDebugFilter.Debug_Level_Core))
        {
            Debug.Log(ConsoleProWrapper.ConvertLog_ToCore(" DoPlayEffect - " + strEffectEvent + " Is Contain : " + _mapEffectPlayInfo.ContainsKey(strEffectEvent)), this);
            return(null);
        }

        CEffect pEffect = DoPlayEffect(strEffectEvent);

        if (pEffect != null)
        {
            pEffect.transform.position = vecPos;
        }

        return(pEffect);
    }
    // ========================== [ Division ] ========================== //

    private void ProcPlayAnim <ENUM_ANIMATION_NAME>(ENUM_ANIMATION_NAME eAnimName, bool bIsLoop, int iAnimationLayer = 0)
    {
        if (gameObject.activeInHierarchy == false)
        {
            if (CheckDebugFilter(EDebugFilter.Debug_Level_Core))
            {
                Debug.LogWarning(ConsoleProWrapper.ConvertLog_ToCore(name + " ProcPlayAnim - gameObject.activeInHierarchy == false"), this);
            }

            return;
        }
        if (_pAnimator.isInitialized == false)         // Animator does not have an AnimatorController 관련 에러 잡기 위함
        {
            // Debug.LogWarning( "Before : " + name + _pAnimator.isInitialized );
            StartCoroutine(CoDelayPlayAnimation(eAnimName.ToString(), bIsLoop, iAnimationLayer));
            return;
        }

        _strCurrentAnimName = eAnimName.ToString();
        if (CheckDebugFilter(EDebugFilter.Debug_Level_Core))
        {
            Debug.Log(name + " Play Animation : " + _strCurrentAnimName, this);
        }

        if (_pAnimator.enabled == false)
        {
            _pAnimator.enabled = true;
        }
        _pAnimator.Play(_strCurrentAnimName, iAnimationLayer, 0f);
        _pAnimator.Update(0);

        _bIsLoop = bIsLoop;
        _fCurrentAnimation_NomalizeTime = 0f;

        if (_bIsLoop || _OnFinishAnimation != null)
        {
            if (_pCoroutine != null)
            {
                StopCoroutine(_pCoroutine);
            }
            _pCoroutine = StartCoroutine(CoUpdateAnimation());
        }
    }
    // ========================================================================== //

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


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

    /* protected - Override & Unity API         */

    protected override IEnumerator OnEnableObjectCoroutine()
    {
        yield return(null);

        while (true)
        {
            Vector3 vecCurrentPos = transform.position;
            if (vecCurrentPos.Equals(_vecPosPrev) == false)
            {
                if (CheckDebugFilter(EDebugFilter.Debug_Level_Core))
                {
                    Debug.Log(name + ConsoleProWrapper.ConvertLog_ToCore(name + " Excute Trigger "), this);
                }

                p_listEvent.Invoke();
            }

            _vecPosPrev = vecCurrentPos;
            yield return(YieldManager.GetWaitForSecond(p_fUpdateTimeDelta));
        }
    }