void TestCase_1() { DebugCustom.SetFileExportType(DebugCustom.EFlagFileExportType.TXT, DebugCustom.EFlagFileExportType.CSV); DebugCustom.SetFileNameType(DebugCustom.EFileNameType.OnMinute); DebugCustom.Log(ETestLogWriter.Programmer_Senior, ETestLogLevelCustom.InGame_Work_1, "Senior Work", this); DebugCustom.Log(ETestLogWriter.Programmer_Junior, ETestLogLevelCustom.InGame_Work_1, "Junior Work", this); DebugCustom.Log(ETestLogWriter.Programmer_Newbie, ETestLogLevelCustom.InGame_Work_1, "Newbie Work", this); // 특정 작성자 로그만 보고싶다 하시면 이것을 통해 필터링합니다. Debug.LogWarning("SetIgnoreLogWriter - Programmer_Senior, Programmer_Junior", this); DebugCustom.SetIgnoreLogWriter(ETestLogWriter.Programmer_Senior, ETestLogWriter.Programmer_Junior); // 그다음 다시 로그를 출력하면 뉴비 로그만 출력 DebugCustom.Log(ETestLogWriter.Programmer_Senior, ETestLogLevelCustom.InGame_Work_1, "Senior Work 2", this); DebugCustom.Log(ETestLogWriter.Programmer_Junior, ETestLogLevelCustom.InGame_Work_1, "Junior Work 2", this); DebugCustom.Log(ETestLogWriter.Programmer_Newbie, ETestLogLevelCustom.InGame_Work_1, "Newbie Work 2", this); // 커스텀 로그 레벨도 가능합니다. // 만약 UI 로그만 보고싶다면 // 그 외 로그는 다 무시 Debug.LogWarning("SetIgnoreLogLevel_Custom - InGame, InGame_ForDebug", this); DebugCustom.SetIgnoreLogLevel(ETestLogLevelCustom.InGame, ETestLogLevelCustom.InGame_ForDebug); DebugCustom.Log(ETestLogWriter.Programmer_Newbie, ETestLogLevelCustom.InGame, "Work Ingame", this); DebugCustom.Log(ETestLogWriter.Programmer_Newbie, ETestLogLevelCustom.InGame_ForDebug, "Work Ingame Debuging", this); DebugCustom.Log(ETestLogWriter.Programmer_Newbie, ETestLogLevelCustom.UI, "Work UI", this); DebugCustom.Log(ETestLogWriter.Programmer_Newbie, ETestLogLevelCustom.UI_ForDebug, "Work UI Debuging", this); }
/* protected - Override & Unity API */ protected override void OnAwake() { base.OnAwake(); _pUITweenGroupPlay = GetComponent <CNGUITweenPlayGroup>(); UIButton[] arrButton = GetComponentsInChildren <UIButton>(); int iLen_Button = arrButton.Length; if (iLen_Button > 0) { _pListener = GetComponentInParent <IOnClickItemListener>(); if (_pListener == null) { DebugCustom.Log_ForCore(EDebugFilterDefault.Error_Core, "부모 오브젝트가 IOnClickItemListener 인터페이스를 상속 받아야합니다."); return; } } else { return; } for (int i = 0; i < iLen_Button; i++) { UIButton pUIButton = arrButton[i]; EventDelegate.Set(pUIButton.onClick, new EventDelegate(this, "OnClick_Item", pUIButton.name)); } }
void Start() { DebugCustom.ClearCustomLogSetting(); TestCase_1(); TestCase_2(); TestCase_3(); TestCase_4(); }
void TestCase_4() { DebugCustom.SetIgnoreLogLevelGroup(ETestLogLevelGroup.InGameGroup); DebugCustom.Log(ETestLogWriter.Programmer_Newbie, ETestLogLevelCustom.InGame_Work_1, ETestLogLevelCustom.InGame_Work_1.ToString()); DebugCustom.Log(ETestLogWriter.Programmer_Newbie, ETestLogLevelCustom.InGame_Work_2, ETestLogLevelCustom.InGame_Work_2.ToString()); DebugCustom.Log(ETestLogWriter.Programmer_Newbie, ETestLogLevelCustom.UI_Work_1, ETestLogLevelCustom.UI_Work_1.ToString()); DebugCustom.Log(ETestLogWriter.Programmer_Newbie, ETestLogLevelCustom.UI_Work_2, ETestLogLevelCustom.UI_Work_2.ToString()); }
/* public - [Event] Function * 프랜드 객체가 호출(For Friend class call)*/ // ========================================================================== // /* protected - [abstract & virtual] */ /* protected - [Event] Function * 자식 객체가 호출(For Child class call) */ /* protected - Override & Unity API */ protected override void OnAwake() { base.OnAwake(); _pAnimation = GetComponentInChildren <SkeletonAnimation>(); if (_pAnimation.SkeletonDataAsset == null) { DebugCustom.Log_ForCore(EDebugFilterDefault.Error_Core, name + "스켈레톤 데이터 에셋이 없다", this); } //_pSkeletonData = _pAnimation.SkeletonDataAsset.GetSkeletonData( false ); _pSkeleton = _pAnimation.skeleton; }
/// <summary> /// 해당 프레임의 버튼들을 전부 활성여부를 세팅합니다. /// </summary> public void DoEnableFrameButtons(bool bEnable) { if (_mapButton == null || _mapButton.Count == 0) { DebugCustom.Log_ForCore(EDebugFilterDefault.Warning_Core, "버튼이 없는데 DoEnableFrameButtons를 호출한다", this, 2); return; } _mapButton.Values.ToList(_listButton); int iLen = _listButton.Count; for (int i = 0; i < iLen; i++) { _listButton[i].isEnabled = bEnable; } }
public void DoPlayAnimation_Loop <ENUM_ANIM_NAME>(ENUM_ANIM_NAME eAnimName) where ENUM_ANIM_NAME : System.IConvertible, System.IComparable { string strAnimName = eAnimName.ToString(); if (_pSkeletonData == null) { DebugCustom.Log_ForCore(EDebugFilterDefault.Warning_Core, name + " _pSkeletonData == null", this); return; } // 애니메이션이 같으면 루프 설정을 무시하기때문에 일부러 틀린 애니메이션 삽입 if (_pAnimation.AnimationName == strAnimName && _pAnimation.loop) { _pAnimation.AnimationName = ""; } _pAnimation.loop = true; _pAnimation.AnimationName = strAnimName; }
virtual protected void OnSlot_Press(int iSlotIndex, bool bPress, CNGUIInventorySlot pSlot) { _iSlotCurrentIndex = iSlotIndex; if ((_eOption & EInventoryOption.MoveSlotItem) == EInventoryOption.MoveSlotItem) { if (bPress) { if (_mapInventoryData.ContainsKey(iSlotIndex) == false) { return; } _pCurrentSelectSlot = pSlot; _pCurrentSelectData = EventGetSlotData(iSlotIndex); pSlot.EventItem_ColliderOnOff(false); DebugCustom.Log("Example", "Inventory", "Press On" + _pCurrentSelectData.IInventoryData_GetImageName(), pSlot); } else { if (_pCurrentSelectData == null) { return; } pSlot.EventItem_ColliderOnOff(true); _mapInventoryData[_pCurrentSelectSlot.p_iSlotIndex] = _mapInventoryData[iSlotIndex]; _mapInventoryData[iSlotIndex] = _pCurrentSelectData; OnSlot_Fill(pSlot, _pCurrentSelectData); OnSlot_Empty(_pCurrentSelectSlot); _pCurrentSelectData = null; _pCurrentSelectSlot = null; DebugCustom.Log("Example", "Inventory", "Press Off" + pSlot.name, pSlot); } } }
void TestCase_3() { DebugCustom.Log(ETestLogWriter.Programmer_Newbie, ETestLogLevelCustom.Warning, "Warnning!!"); DebugCustom.Log(ETestLogWriter.Programmer_Newbie, ETestLogLevelCustom.Error, "Error!!"); }