Ejemplo n.º 1
0
    public static bool GetWhiteList(MAuthor author)
    {
#if MHY_DEBUG
        if (IsMainThread)
        {
            if (commonLogWhiteList == -1)
            {
                if (PlayerPrefs.HasKey("CommonLogWhiteList"))
                {
                    commonLogWhiteList = PlayerPrefs.GetInt("CommonLogWhiteList");
                }
                else
                {
                    return(true);
                }
            }
            return(((commonLogWhiteList >> (int)author) & 1) == 1);
        }
        else
        {
            if (commonLogWhiteList == -1)
            {
                return(true);
            }
            else
            {
                return(((commonLogWhiteList >> (int)author) & 1) == 1);
            }
        }
#else
        return(true);
#endif
    }
Ejemplo n.º 2
0
 public static void LogWarning(MAuthor _author, object _message)
 {
     if (GetWhiteList(_author))
     {
         Debug.LogWarning($"[{author[(int)_author]}] {_message}");
     }
 }
Ejemplo n.º 3
0
 public static void LogWarning(MAuthor _author, object _message, MHandler _handler)
 {
     if (GetWhiteList(_author))
     {
         Debug.LogWarning($"[{author[(int)_author]}] {_message}, 请找<color=#00ff00>{handler[(int)_handler]}</color>解决");
     }
 }
Ejemplo n.º 4
0
 public static void Log(MAuthor _author, object _message)
 {
     if (GetWhiteList(_author))
     {
         Log($"#{author[(int)_author]}# {_message}");
     }
 }